public function findOneById($id)
    {
        $qb = $this->getQueryBuilder();

        return $qb
            ->leftJoin('c.rows', 'row')
            ->leftJoin('row.blocks', 'block')
            ->leftJoin('block.translations', 'translation')
            ->addSelect('row', 'block', 'translation')
            ->andWhere($qb->expr()->eq('c.id', ':id'))
            ->getQuery()
            ->useQueryCache(true)
            // TODO ->useResultCache(true, 3600, Container::getEntityTagPrefix() . '[id:'.$id.']')
            ->setParameter('id', $id)
            ->getOneOrNullResult();
    }
public function findOneById($id)
    {
        $qb = $this->getQueryBuilder();

        return $qb
            ->leftJoin('c.rows', 'row')
            ->leftJoin('row.blocks', 'block')
            ->leftJoin('block.translations', 'translation')
            ->addSelect('row', 'block', 'translation')
            ->andWhere($qb->expr()->eq('c.id', ':id'))
            ->getQuery()
            ->useQueryCache(true)
            // TODO ->useResultCache(true, 3600, Container::getEntityTagPrefix() . '[id:'.$id.']')
            ->setParameter('id', $id)
            ->getOneOrNullResult();
    }
public function findOneById ( $ id ) { $ qb = $ this -> getQueryBuilder ( ) ; return $ qb -> leftJoin ( 'c.rows' , 'row' ) -> leftJoin ( 'row.blocks' , 'block' ) -> leftJoin ( 'block.translations' , 'translation' ) -> addSelect ( 'row' , 'block' , 'translation' ) -> andWhere ( $ qb -> expr ( ) -> eq ( 'c.id' , ':id' ) ) -> getQuery ( ) -> useQueryCache ( true ) // TODO ->useResultCache(true, 3600, Container::getEntityTagPrefix() . '[id:'.$id.']') -> setParameter ( 'id' , $ id ) -> getOneOrNullResult ( ) ; }
Finds the container by id.

@param int $id

@return \Ekyna\Bundle\CmsBundle\Editor\Model\ContainerInterface|null
Finds the container by id .