src/Sulu/Bundle/WebsiteBundle/Entity/AnalyticsRepository.php
public function findById($id)
    {
        $queryBuilder = $this->createQueryBuilder('a')
            ->addSelect('domains')
            ->leftJoin('a.domains', 'domains')
            ->where('a.id = :id');

        $query = $queryBuilder->getQuery();
        $query->setParameter('id', $id);

        return $query->getSingleResult();
    }
public function findById($id)
    {
        $queryBuilder = $this->createQueryBuilder('a')
            ->addSelect('domains')
            ->leftJoin('a.domains', 'domains')
            ->where('a.id = :id');

        $query = $queryBuilder->getQuery();
        $query->setParameter('id', $id);

        return $query->getSingleResult();
    }
public function findById ( $ id ) { $ queryBuilder = $ this -> createQueryBuilder ( 'a' ) -> addSelect ( 'domains' ) -> leftJoin ( 'a.domains' , 'domains' ) -> where ( 'a.id = :id' ) ; $ query = $ queryBuilder -> getQuery ( ) ; $ query -> setParameter ( 'id' , $ id ) ; return $ query -> getSingleResult ( ) ; }
Returns analytics by id.

@param int $id

@return Analytics
Returns analytics by id .