/** * Creates data provider instance with search query applied * * @param array $params * * @return ActiveDataProvider */ public function search($params) { $query = AgendaNotulen::find(); // add conditions that should always apply here $dataProvider = new ActiveDataProvider(['query' => $query]); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } // grid filtering conditions $query->andFilterWhere(['ID' => $this->ID, 'NOTULEN_ID' => $this->NOTULEN_ID, 'DATE_LINE' => $this->DATE_LINE, 'CREATE_BY' => $this->CREATE_BY, 'CREATE_AT' => $this->CREATE_AT, 'UPDATE_BY' => $this->UPDATE_BY, 'UPDATE_AT' => $this->UPDATE_AT]); $query->andFilterWhere(['like', 'DESCRIPTION', $this->DESCRIPTION])->andFilterWhere(['like', 'PIC', $this->PIC]); return $dataProvider; }
/** * Creates a new Notulen model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreateAgenda($id) { $model = new AgendaNotulen(); if ($model->load(Yii::$app->request->post())) { $model->NOTULEN_ID = $id; $model->save(); return $this->redirect(['review', 'id' => $model->NOTULEN_ID]); } else { return $this->renderAjax('create_agenda', ['model' => $model, 'data_emp' => self::get_aryEmploye()]); } }