/**
  * @param ActiveDataProvider $activeDataProvider
  */
 public function search(ActiveDataProvider $activeDataProvider)
 {
     $this->searchModel->search($activeDataProvider);
     if ($this->searchRelatedPropertiesModel) {
         $this->searchRelatedPropertiesModel->search($activeDataProvider);
     }
 }
 /**
  * @param ActiveDataProvider $activeDataProvider
  */
 public function search(ActiveDataProvider $activeDataProvider)
 {
     if ($this->onlyExistsFilters) {
         /**
          * @var $query \yii\db\ActiveQuery
          */
         $query = clone $activeDataProvider->query;
         //TODO::notice errors
         $ids = $query->select(['*', 'cms_content_element.id as mainId'])->indexBy('mainId')->asArray()->all();
         $this->elementIds = array_keys($ids);
     }
     $this->searchModel->search($activeDataProvider);
     if ($this->searchRelatedPropertiesModel) {
         $this->searchRelatedPropertiesModel->search($activeDataProvider);
     }
     if ($this->searchOfferRelatedPropertiesModel) {
         $this->searchOfferRelatedPropertiesModel->search($activeDataProvider);
     }
 }