ModelBundle/Repository/NodeRepository.php
protected function getTreeByLanguageAndFieldAndSiteId($language, $field, $siteId)
    {
        $qa = $this->createAggregationQuery();
        $qa->match(
            array(
                'siteId' => $siteId,
                'language' => $language,
                'status.publishedState' => true,
                'deleted' => false,
                $field => true
            )
        );

        return $this->hydrateAggregateQuery($qa);
    }
protected function getTreeByLanguageAndFieldAndSiteId($language, $field, $siteId)
    {
        $qa = $this->createAggregationQuery();
        $qa->match(
            array(
                'siteId' => $siteId,
                'language' => $language,
                'status.publishedState' => true,
                'deleted' => false,
                $field => true
            )
        );

        return $this->hydrateAggregateQuery($qa);
    }
@param string $language
@param string $field
@param string $siteId

@return array
@throws \Doctrine\ODM\MongoDB\MongoDBException