Exemple #1
0
 /**
  * Lists all Task models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new TaskSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     Url::remember();
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
 /**
  * @task control
  */
 public function actionControl()
 {
     $searchModel = new TaskSearch();
     $query = Task::find()->where(['task.teacher_id' => Yii::$app->user->identity->teacher->id]);
     $dataProvider = $searchModel->search(Yii::$app->request->get(), $query);
     return $this->render('control', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel]);
 }