ModelBundle/Repository/ContentTypeRepository.php
protected function getFilterSearch(PaginateFinderConfiguration $configuration) {
        $filter = array();
        $name = $configuration->getSearchIndex('name');
        $language = $configuration->getSearchIndex('language');
        if (null !== $name && $name !== '' && null !== $language && $language !== '' ) {
            $filter['names.' . $language] = new \MongoRegex('/.*'.$name.'.*/i');
        }

        $linkedToSite = $configuration->getSearchIndex('linkedToSite');
        if (null !== $linkedToSite && $linkedToSite !== '') {
            $filter['linkedToSite'] = (boolean) $linkedToSite;
        }

        $contentTypeId = $configuration->getSearchIndex('contentTypeId');
        if (null !== $contentTypeId && $contentTypeId !== '') {
            $filter['contentTypeId'] =new \MongoRegex('/.*'.$contentTypeId.'.*/i');
        }

        return $filter;
    }
protected function getFilterSearch(PaginateFinderConfiguration $configuration) {
        $filter = array();
        $name = $configuration->getSearchIndex('name');
        $language = $configuration->getSearchIndex('language');
        if (null !== $name && $name !== '' && null !== $language && $language !== '' ) {
            $filter['names.' . $language] = new \MongoRegex('/.*'.$name.'.*/i');
        }

        $linkedToSite = $configuration->getSearchIndex('linkedToSite');
        if (null !== $linkedToSite && $linkedToSite !== '') {
            $filter['linkedToSite'] = (boolean) $linkedToSite;
        }

        $contentTypeId = $configuration->getSearchIndex('contentTypeId');
        if (null !== $contentTypeId && $contentTypeId !== '') {
            $filter['contentTypeId'] =new \MongoRegex('/.*'.$contentTypeId.'.*/i');
        }

        return $filter;
    }
@param PaginateFinderConfiguration $configuration

@return array