Since: 2.0
Author: Qiang Xue (qiang.xue@gmail.com)
Author: Mark Jebri (mark.github@yandex.ru)
Inheritance: extends Base
Exemplo n.º 1
0
 /**
  * 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" : ""]);
 }
Exemplo n.º 2
0
 public function getProfile()
 {
     return $this->hasOne(Profile::className(), ['user_id' => 'id']);
 }
Exemplo n.º 3
0
 /**
  * @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' : '']);
 }