yii\debug\panels\TimelinePanel::getModels PHP Method

getModels() protected method

Can be used with data providers, such as \yii\data\ArrayDataProvider.
protected getModels ( boolean $refresh = false ) : array
$refresh boolean if need to build models from log messages and refresh them.
return array models
    protected function getModels($refresh = false)
    {
        if ($this->_models === null || $refresh) {
            $this->_models = [];
            if (isset($this->module->panels['profiling']->data['messages'])) {
                $this->_models = Yii::getLogger()->calculateTimings($this->module->panels['profiling']->data['messages']);
            }
        }
        return $this->_models;
    }