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

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

        return $qa;
    }
@param string $language
@param string $siteId

@return Stage