Newscoop\ArticlesBundle\Entity\Repository\EditorialCommentRepository::getAll PHP Метод

getAll() публичный Метод

Get all editorial comments
public getAll ( boolean $fetchReplies = true ) : Doctrine\ORM\Query
$fetchReplies boolean
Результат Doctrine\ORM\Query
    public function getAll($fetchReplies = true)
    {
        $qb = $this->createQueryBuilder('ec');
        $qb->select('ec', 'u')->join('ec.user', 'u')->andWhere('ec.is_active = :is_active')->setParameters(array('is_active' => true));
        if (!$fetchReplies) {
            $qb->andWhere($qb->expr()->isNull('ec.parentId'));
        }
        return $qb->getQuery();
    }