Bundle/BusinessPageBundle/Repository/BusinessTemplateRepository.php
public function findOneByLikeUrl($url)
    {
        $pagePattern = null;

        $qb = $this->createQueryBuilder('BusinessTemplate');
        $qb->where($qb->expr()->like('BusinessTemplate.url', $qb->expr()->literal($url)));

        $qb->orderBy('BusinessTemplate.updatedAt', 'ASC');

        $results = $qb->getQuery()->getResult();

        if (count($results) > 0) {
            $pagePattern = $results[0];
        }

        return $pagePattern;
    }
public function findOneByLikeUrl($url)
    {
        $pagePattern = null;

        $qb = $this->createQueryBuilder('BusinessTemplate');
        $qb->where($qb->expr()->like('BusinessTemplate.url', $qb->expr()->literal($url)));

        $qb->orderBy('BusinessTemplate.updatedAt', 'ASC');

        $results = $qb->getQuery()->getResult();

        if (count($results) > 0) {
            $pagePattern = $results[0];
        }

        return $pagePattern;
    }
public function findOneByLikeUrl ( $ url ) { $ pagePattern = null ; $ qb = $ this -> createQueryBuilder ( 'BusinessTemplate' ) ; $ qb -> where ( $ qb -> expr ( ) -> like ( 'BusinessTemplate.url' , $ qb -> expr ( ) -> literal ( $ url ) ) ) ; $ qb -> orderBy ( 'BusinessTemplate.updatedAt' , 'ASC' ) ; $ results = $ qb -> getQuery ( ) -> getResult ( ) ; if ( count ( $ results ) > 0 ) { $ pagePattern = $ results [ 0 ] ; } return $ pagePattern ; }
Find the business entity page pattern that looks like this url.

@param string $url

@return array The list of pagePatterns
Find the business entity page pattern that looks like this url .