ModelBundle/Repository/ContentRepository.php
protected function filterSearch(PaginateFinderConfiguration $configuration, Stage $qa, array $searchTypes)
    {
        $qa = $this->generateFilter($configuration, $qa, StringFilterStrategy::FILTER_TYPE, 'name', 'name');
        $language = $configuration->getSearchIndex('language');
        if (null !== $language && $language !== '') {
            $qa->match(array('language' => $language));
        }
        $status = $configuration->getSearchIndex('status');
        if (null !== $status && $status !== '') {
            $qa->match(array('status._id' => new \MongoId($status)));
        }
        $qa = $this->generateFilter($configuration, $qa, BooleanFilterStrategy::FILTER_TYPE, 'linked_to_site', 'linkedToSite');
        $qa = $this->generateFilter($configuration, $qa, DateFilterStrategy::FILTER_TYPE, 'created_at', 'createdAt', $configuration->getSearchIndex('date_format'));
        $qa = $this->generateFilter($configuration, $qa, StringFilterStrategy::FILTER_TYPE, 'created_by', 'createdBy');
        $qa = $this->generateFilter($configuration, $qa, DateFilterStrategy::FILTER_TYPE, 'updated_at', 'updatedAt', $configuration->getSearchIndex('date_format'));
        $qa = $this->generateFilter($configuration, $qa, StringFilterStrategy::FILTER_TYPE, 'updated_by', 'updatedBy');
        $qa = $this->generateFieldsFilter($configuration, $qa, $searchTypes);

        return $qa;
    }
protected function filterSearch(PaginateFinderConfiguration $configuration, Stage $qa, array $searchTypes)
    {
        $qa = $this->generateFilter($configuration, $qa, StringFilterStrategy::FILTER_TYPE, 'name', 'name');
        $language = $configuration->getSearchIndex('language');
        if (null !== $language && $language !== '') {
            $qa->match(array('language' => $language));
        }
        $status = $configuration->getSearchIndex('status');
        if (null !== $status && $status !== '') {
            $qa->match(array('status._id' => new \MongoId($status)));
        }
        $qa = $this->generateFilter($configuration, $qa, BooleanFilterStrategy::FILTER_TYPE, 'linked_to_site', 'linkedToSite');
        $qa = $this->generateFilter($configuration, $qa, DateFilterStrategy::FILTER_TYPE, 'created_at', 'createdAt', $configuration->getSearchIndex('date_format'));
        $qa = $this->generateFilter($configuration, $qa, StringFilterStrategy::FILTER_TYPE, 'created_by', 'createdBy');
        $qa = $this->generateFilter($configuration, $qa, DateFilterStrategy::FILTER_TYPE, 'updated_at', 'updatedAt', $configuration->getSearchIndex('date_format'));
        $qa = $this->generateFilter($configuration, $qa, StringFilterStrategy::FILTER_TYPE, 'updated_by', 'updatedBy');
        $qa = $this->generateFieldsFilter($configuration, $qa, $searchTypes);

        return $qa;
    }
protected function filterSearch ( PaginateFinderConfiguration $ configuration , Stage $ qa , array $ searchTypes ) { $ qa = $ this -> generateFilter ( $ configuration , $ qa , StringFilterStrategy :: FILTER_TYPE , 'name' , 'name' ) ; $ language = $ configuration -> getSearchIndex ( 'language' ) ; if ( null !== $ language && $ language !== '' ) { $ qa -> match ( array ( 'language' => $ language ) ) ; } $ status = $ configuration -> getSearchIndex ( 'status' ) ; if ( null !== $ status && $ status !== '' ) { $ qa -> match ( array ( 'status._id' => new \ MongoId ( $ status ) ) ) ; } $ qa = $ this -> generateFilter ( $ configuration , $ qa , BooleanFilterStrategy :: FILTER_TYPE , 'linked_to_site' , 'linkedToSite' ) ; $ qa = $ this -> generateFilter ( $ configuration , $ qa , DateFilterStrategy :: FILTER_TYPE , 'created_at' , 'createdAt' , $ configuration -> getSearchIndex ( 'date_format' ) ) ; $ qa = $ this -> generateFilter ( $ configuration , $ qa , StringFilterStrategy :: FILTER_TYPE , 'created_by' , 'createdBy' ) ; $ qa = $ this -> generateFilter ( $ configuration , $ qa , DateFilterStrategy :: FILTER_TYPE , 'updated_at' , 'updatedAt' , $ configuration -> getSearchIndex ( 'date_format' ) ) ; $ qa = $ this -> generateFilter ( $ configuration , $ qa , StringFilterStrategy :: FILTER_TYPE , 'updated_by' , 'updatedBy' ) ; $ qa = $ this -> generateFieldsFilter ( $ configuration , $ qa , $ searchTypes ) ; return $ qa ; }
@param PaginateFinderConfiguration $configuration
@param Stage                       $qa
@param array                       $searchTypes

@return Stage
@param PaginateFinderConfiguration $configuration @param Stage $qa @param array $searchTypes