/** * This adds the 'numFiles' data * @inheritdoc */ public function getDetail() { $searchModel = new Profile(); $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams(), $this->getModels()); return Yii::$app->view->render('panels/profile/detail', ['panel' => $this, 'dataProvider' => $dataProvider, 'searchModel' => $searchModel, 'memory' => sprintf('%.3f MB', $this->data['memory'] / 1048576), 'time' => number_format($this->data['time'] * 1000) . ' ms', 'numFiles' => !empty($this->data["numFiles"]) ? "{$this->data["numFiles"]} files" : ""]); }
public function getProfile() { return $this->hasOne(Profile::className(), ['user_id' => 'id']); }
/** * @inheritdoc */ public function getDetail() { $searchModel = new Profile(); $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams(), $this->getModels()); return Yii::$app->view->render('@yii/debug/views/default/panels/profile/detail', ['panel' => $this, 'dataProvider' => $dataProvider, 'searchModel' => $searchModel, 'memory' => isset($this->data['memory']) ? sprintf('%.1f MB', $this->data['memory'] / 1048576) : '', 'time' => isset($this->data['time']) ? number_format($this->data['time'] * 1000) . ' ms' : '']); }