public function getPublishedRevisionId($siteId, $name, $type = PageTypes::NORMAL)
    {
        /** @var \Doctrine\ORM\QueryBuilder $queryBuilder */
        $queryBuilder = $this->_em->createQueryBuilder();
        $queryBuilder->select('publishedRevision.revisionId')
            ->from(\Rcm\Entity\Page::class, 'page')
            ->join('page.publishedRevision', 'publishedRevision')
            ->join('page.site', 'site')
            ->where('site.siteId = :siteId')
            ->andWhere('page.name = :pageName')
            ->andWhere('page.pageType = :pageType')
            ->setParameter('siteId', $siteId)
            ->setParameter('pageName', $name)
            ->setParameter('pageType', $type);

        try {
            return $queryBuilder->getQuery()->getSingleScalarResult();
        } catch (NoResultException $e) {
            return null;
        }
    }
public function getPublishedRevisionId($siteId, $name, $type = PageTypes::NORMAL)
    {
        /** @var \Doctrine\ORM\QueryBuilder $queryBuilder */
        $queryBuilder = $this->_em->createQueryBuilder();
        $queryBuilder->select('publishedRevision.revisionId')
            ->from(\Rcm\Entity\Page::class, 'page')
            ->join('page.publishedRevision', 'publishedRevision')
            ->join('page.site', 'site')
            ->where('site.siteId = :siteId')
            ->andWhere('page.name = :pageName')
            ->andWhere('page.pageType = :pageType')
            ->setParameter('siteId', $siteId)
            ->setParameter('pageName', $name)
            ->setParameter('pageType', $type);

        try {
            return $queryBuilder->getQuery()->getSingleScalarResult();
        } catch (NoResultException $e) {
            return null;
        }
    }
public function getPublishedRevisionId ( $ siteId , $ name , $ type = PageTypes :: NORMAL ) { /** @var \Doctrine\ORM\QueryBuilder $queryBuilder */ $ queryBuilder = $ this -> _em -> createQueryBuilder ( ) ; $ queryBuilder -> select ( 'publishedRevision.revisionId' ) -> from ( \ Rcm \ Entity \ Page :: class , 'page' ) -> join ( 'page.publishedRevision' , 'publishedRevision' ) -> join ( 'page.site' , 'site' ) -> where ( 'site.siteId = :siteId' ) -> andWhere ( 'page.name = :pageName' ) -> andWhere ( 'page.pageType = :pageType' ) -> setParameter ( 'siteId' , $ siteId ) -> setParameter ( 'pageName' , $ name ) -> setParameter ( 'pageType' , $ type ) ; try { return $ queryBuilder -> getQuery ( ) -> getSingleScalarResult ( ) ; } catch ( NoResultException $ e ) { return null ; } }
Gets the DB result of the Published Revision

@param integer $siteId Site Id
@param string $name Name of the container
@param string $type Type of the container.  Currently only used by the page
container.

@return mixed
Gets the DB result of the Published Revision