public function search($params)
 {
     $query = Establecimiento::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'dependencia_organizativa_id' => $this->dependencia_organizativa_id]);
     $query->andFilterWhere(['like', 'nombre', $this->nombre])->andFilterWhere(['like', 'codigo', $this->codigo])->andFilterWhere(['like', 'numero', $this->numero])->andFilterWhere(['like', 'telefono', $this->telefono])->andFilterWhere(['like', 'telefono_alternativo', $this->telefono_alternativo])->andFilterWhere(['like', 'fax', $this->fax])->andFilterWhere(['like', 'email', $this->email])->andFilterWhere(['like', 'sitio_web', $this->sitio_web]);
     return $dataProvider;
 }
 public function find(Route $route)
 {
     $this->establecimiento = Establecimiento::find($route->getParameter('establecimiento'));
 }