src/PHPDish/Bundle/PostBundle/Controller/BookController.php
public function getSummaryAction($slug)
    {
        $book = $this->getBookManager()->findBook($slug);
        $chaptersTree = $this->getBookManager()->findBookChaptersTree($book);

        return $this->render($this->configuration->getTemplate('Book:summary.html.twig'), [
            'book' => $book,
            'chaptersTree' => $chaptersTree
        ]);
    }
public function getSummaryAction($slug)
    {
        $book = $this->getBookManager()->findBook($slug);
        $chaptersTree = $this->getBookManager()->findBookChaptersTree($book);

        return $this->render($this->configuration->getTemplate('Book:summary.html.twig'), [
            'book' => $book,
            'chaptersTree' => $chaptersTree
        ]);
    }
查看电子书目录

@Route("/books/{slug}/summary", name="book_summary")
@Method("GET")
@param string $slug
@return Response