Ejemplo n.º 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Venue::find();
     $query->andFilterWhere(['state' => AppActiveRecord::STATUS_DELETE]);
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $query->andFilterWhere([Venue::tableName() . '.status' => '0']);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['Id' => $this->Id, 'categoryId' => $this->categoryId, 'cityId' => $this->cityId, 'zoneId' => $this->zoneId, 'localityId' => $this->localityId, 'gpsLat' => $this->gpsLat, 'gpsLong' => $this->gpsLong, 'venueType' => $this->venueType, 'capacity' => $this->capacity, 'startTime' => $this->startTime, 'endTime' => $this->endTime, 'IsReccomended' => $this->IsReccomended, 'status' => $this->status, 'flag' => $this->flag, 'createdOn' => $this->createdOn, 'createdBy' => $this->createdBy, 'updatedOn' => $this->updatedOn, 'updatedBy' => $this->updatedBy, 'csvUpload' => $this->csvUpload, 'entityType' => $this->entityType]);
     $query->andFilterWhere(['like', 'name', $this->name])->andFilterWhere(['like', 'address', $this->address])->andFilterWhere(['like', 'landmark', $this->landmark])->andFilterWhere(['like', 'phone', $this->phone])->andFilterWhere(['like', 'tollfree', $this->tollfree])->andFilterWhere(['like', 'mobile', $this->mobile])->andFilterWhere(['like', 'facility', $this->facility])->andFilterWhere(['like', 'description', $this->description])->andFilterWhere(['like', 'contactName', $this->contactName])->andFilterWhere(['like', 'email', $this->email])->andFilterWhere(['like', 'url', $this->url])->andFilterWhere(['like', 'facebookUrl', $this->facebookUrl])->andFilterWhere(['like', 'seatType', $this->seatType])->andFilterWhere(['like', 'reservationInfo', $this->reservationInfo])->andFilterWhere(['like', 'audiVsCapcity', $this->audiVsCapcity])->andFilterWhere(['like', 'ip', $this->ip])->andFilterWhere(['like', 'oldGuid', $this->oldGuid])->andFilterWhere(['like', 'guid', $this->guid])->andFilterWhere(['like', 'csvRemarks', $this->csvRemarks])->andFilterWhere(['like', 'brand', $this->brand])->andFilterWhere(['like', 'mall', $this->mall])->andFilterWhere(['like', 'tags', $this->tags]);
     return $dataProvider;
 }