/**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Decisionsb21::find();
     $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;
     }
     $query->andFilterWhere(['enterName' => $this->enterName]);
     $query->andFilterWhere(['like', 'b21_ada', $this->b21_ada])->andFilterWhere(['like', 'afm', $this->afm])->andFilterWhere(['like', 'afmType', $this->afmType])->andFilterWhere(['like', 'afmCountry', $this->afmCountry])->andFilterWhere(['like', 'decisionsB21col', $this->decisionsB21col])->andFilterWhere(['like', 'name', $this->name])->andFilterWhere(['like', 'noVATOrg', $this->noVATOrg])->andFilterWhere(['like', 'documentType', $this->documentType]);
     return $dataProvider;
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getDecisionsb21()
 {
     return $this->hasOne(Decisionsb21::className(), ['b13_ada' => 'ada']);
 }
 /**
  * Finds the Decisionsb21 model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param string $id
  * @return Decisionsb21 the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Decisionsb21::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }