/** * Lists all Calendar models. * @return mixed */ public function actionIndex() { $searchModel = new CalendarSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }
public function actionFriendnotes($id, $date) { $searchModel = new CalendarSearch(); $dataProvider = $searchModel->search(['CalendarSearch' => ['creator' => $id, 'access' => ['user_id' => Yii::$app->user->id, 'date' => $date]]]); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }
public function actionMynotes() { $searchModel = new CalendarSearch(); $dataProvider = $searchModel->search(['CalendarSearch' => array_merge(['creator' => Yii::$app->user->id, Yii::$app->request->queryParams])]); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }