src/PHPDish/Bundle/PostBundle/Service/BookManager.php
public function findBookChaptersTree(BookInterface $book)
    {
        $repo = $this->postManager->getPostRepository();

        return $repo->createQueryBuilder('p')->where('p.category = :book')
            ->andWhere('p.enabled = :enabled')->setParameter('enabled', true)
            ->setParameter('book', $book)
            ->orderBy('p.level, p.left', 'ASC')
            ->getQuery()
            ->setHint(\Doctrine\ORM\Query::HINT_INCLUDE_META_COLUMNS, true)
            ->getResult('tree');
    }
public function findBookChaptersTree(BookInterface $book)
    {
        $repo = $this->postManager->getPostRepository();

        return $repo->createQueryBuilder('p')->where('p.category = :book')
            ->andWhere('p.enabled = :enabled')->setParameter('enabled', true)
            ->setParameter('book', $book)
            ->orderBy('p.level, p.left', 'ASC')
            ->getQuery()
            ->setHint(\Doctrine\ORM\Query::HINT_INCLUDE_META_COLUMNS, true)
            ->getResult('tree');
    }
{@inheritdoc}