public function findOneByName($name)
    {
        $qb = $this->getQueryBuilder();

        return $qb
            ->andWhere($qb->expr()->eq('b.name', ':name'))
            ->andWhere($qb->expr()->isNull('b.row'))
            ->getQuery()
            ->useQueryCache(true)
            // TODO ->useResultCache(true, 3600, Block::getEntityTagPrefix() . '[name:'.$name.']')
            ->setParameter('name', $name)
            ->getOneOrNullResult();
    }
public function findOneByName($name)
    {
        $qb = $this->getQueryBuilder();

        return $qb
            ->andWhere($qb->expr()->eq('b.name', ':name'))
            ->andWhere($qb->expr()->isNull('b.row'))
            ->getQuery()
            ->useQueryCache(true)
            // TODO ->useResultCache(true, 3600, Block::getEntityTagPrefix() . '[name:'.$name.']')
            ->setParameter('name', $name)
            ->getOneOrNullResult();
    }
public function findOneByName ( $ name ) { $ qb = $ this -> getQueryBuilder ( ) ; return $ qb -> andWhere ( $ qb -> expr ( ) -> eq ( 'b.name' , ':name' ) ) -> andWhere ( $ qb -> expr ( ) -> isNull ( 'b.row' ) ) -> getQuery ( ) -> useQueryCache ( true ) // TODO ->useResultCache(true, 3600, Block::getEntityTagPrefix() . '[name:'.$name.']') -> setParameter ( 'name' , $ name ) -> getOneOrNullResult ( ) ; }
Finds the block by name

@param string $name

@return \Ekyna\Bundle\CmsBundle\Editor\Model\BlockInterface|null
Finds the block by name