ModelBundle/Repository/ContentTypeRepository.php
public function findAllNotDeletedInLastVersion(array $contentTypes = array())
    {
        $qa = $this->createAggregationQuery();
        $qa->match(
            array(
                'deleted' => false
            )
        );
        if (!empty($contentTypes)) {
            $qa->match(
                array('contentTypeId' => array('$in' => $contentTypes))
            );
        }
        $elementName = 'contentType';
        $this->generateLastVersionFilter($qa, $elementName);

        return $this->hydrateAggregateQuery($qa, $elementName, 'getContentTypeId');
    }
public function findAllNotDeletedInLastVersion(array $contentTypes = array())
    {
        $qa = $this->createAggregationQuery();
        $qa->match(
            array(
                'deleted' => false
            )
        );
        if (!empty($contentTypes)) {
            $qa->match(
                array('contentTypeId' => array('$in' => $contentTypes))
            );
        }
        $elementName = 'contentType';
        $this->generateLastVersionFilter($qa, $elementName);

        return $this->hydrateAggregateQuery($qa, $elementName, 'getContentTypeId');
    }
public function findAllNotDeletedInLastVersion ( array $ contentTypes = array ( ) ) { $ qa = $ this -> createAggregationQuery ( ) ; $ qa -> match ( array ( 'deleted' => false ) ) ; if ( ! empty ( $ contentTypes ) ) { $ qa -> match ( array ( 'contentTypeId' => array ( '$in' => $ contentTypes ) ) ) ; } $ elementName = 'contentType' ; $ this -> generateLastVersionFilter ( $ qa , $ elementName ) ; return $ this -> hydrateAggregateQuery ( $ qa , $ elementName , 'getContentTypeId' ) ; }
@param array $contentTypes

@return array
@param array $contentTypes