private function addEntryAdvancedSearchFilter(KalturaCaptionAssetItemFilter $captionAssetItemFilter, entryFilter $entryCoreFilter) { //create advanced filter on entry caption $entryCaptionAdvancedSearch = new EntryCaptionAssetSearchFilter(); $entryCaptionAdvancedSearch->setContentLike($captionAssetItemFilter->contentLike); $entryCaptionAdvancedSearch->setContentMultiLikeAnd($captionAssetItemFilter->contentMultiLikeAnd); $entryCaptionAdvancedSearch->setContentMultiLikeOr($captionAssetItemFilter->contentMultiLikeOr); $inputAdvancedSearch = $entryCoreFilter->getAdvancedSearch(); if (!is_null($inputAdvancedSearch)) { $advancedSearchOp = new AdvancedSearchFilterOperator(); $advancedSearchOp->setType(AdvancedSearchFilterOperator::SEARCH_AND); $advancedSearchOp->setItems(array($inputAdvancedSearch, $entryCaptionAdvancedSearch)); $entryCoreFilter->setAdvancedSearch($advancedSearchOp); } else { $entryCoreFilter->setAdvancedSearch($entryCaptionAdvancedSearch); } }
/** * Applies a single filter * * @param baseObjectFilter $filter */ protected function applyFilter(entryFilter $filter) { $advancedSearch = $filter->getAdvancedSearch(); if (is_object($advancedSearch) && $advancedSearch instanceof AdvancedSearchFilterItem) { KalturaLog::debug('Apply advanced filter [' . get_class($advancedSearch) . ']'); $advancedSearch->apply($filter, $this, $this->whereClause, $this->whereClause); } $this->applyFilterFields($filter); $this->applyPartnerScope($filter); // attach all unhandled fields $filter->attachToFinalCriteria($this); }