/** * Creates data provider instance with search query applied * * @param array $params * * @return ActiveDataProvider */ public function search($params) { $query = Evaluacion::find(); $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(['idevaluacion' => $this->idevaluacion, 'dniE' => $this->dniE, 'apellidoE', $this->apellidoE, 'nombreE', $this->nombreE, 'comentarioE', $this->comentarioE, 'montotalE' => $this->montotalE, 'grufamE' => $this->grufamE, 'idpropietarioE' => $this->idpropietarioE, 'idocupacionE' => $this->idocupacionE, 'idinstruccionE' => $this->idinstruccionE, 'idsaludE' => $this->idsaludE, 'iddistanciaE' => $this->iddistanciaE, 'causa1' => $this->causa1, 'causa2' => $this->causa2, 'causa3' => $this->causa3, 'causa4' => $this->causa4, 'userE' => $this->userE]); $query->andFilterWhere(['=', 'dniE', $this->dniE]); $dataProvider = new ActiveDataProvider(['query' => $query]); if ($this->dniE != '') { return $dataProvider; } else { return true; } }