/**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = EventDeterminant::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'year' => $this->year, 'ash_wednesday' => $this->ash_wednesday, 'easter_sunday' => $this->easter_sunday, 'pentecost_sunday' => $this->pentecost_sunday, 'first_sunday_of_advent' => $this->first_sunday_of_advent]);
     $query->andFilterWhere(['like', 'sunday_cycle', $this->sunday_cycle])->andFilterWhere(['like', 'weekday_cycle', $this->weekday_cycle])->andFilterWhere(['like', 'week_ot_before_lent', $this->week_ot_before_lent])->andFilterWhere(['like', 'week_ot_after_pentecost', $this->week_ot_after_pentecost]);
     return $dataProvider;
 }
 /**
  * Finds the EventDeterminant model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return EventDeterminant the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = EventDeterminant::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }