ModelBundle/Repository/NodeRepository.php
public function countWithBlockUsed($siteId, $language, $blockId)
    {
        $qb = $this->createQueryBuilder();
        $qb->field('language')->equals($language);
        $qb->field('siteId')->equals($siteId);

        $functionFilter = $this->generateFunctionFilterBlock($blockId);
        $qb->where($functionFilter);

        return $qb->getQuery()->execute()->count();
    }
public function countWithBlockUsed($siteId, $language, $blockId)
    {
        $qb = $this->createQueryBuilder();
        $qb->field('language')->equals($language);
        $qb->field('siteId')->equals($siteId);

        $functionFilter = $this->generateFunctionFilterBlock($blockId);
        $qb->where($functionFilter);

        return $qb->getQuery()->execute()->count();
    }
public function countWithBlockUsed ( $ siteId , $ language , $ blockId ) { $ qb = $ this -> createQueryBuilder ( ) ; $ qb -> field ( 'language' ) -> equals ( $ language ) ; $ qb -> field ( 'siteId' ) -> equals ( $ siteId ) ; $ functionFilter = $ this -> generateFunctionFilterBlock ( $ blockId ) ; $ qb -> where ( $ functionFilter ) ; return $ qb -> getQuery ( ) -> execute ( ) -> count ( ) ; }
@param string  $siteId
@param string  $language
@param string  $blockId

@return int
@param string $siteId @param string $language @param string $blockId