src/PHPDish/Bundle/PostBundle/Twig/PostExtension.php
public function getFunctions(): array
    {
        return [
            new \Twig_SimpleFunction('get_category', [$this->categoryManager, 'findCategoryById']),
            new \Twig_SimpleFunction('get_category_by_slug', [$this->categoryManager, 'findCategoryBySlug']),
            new \Twig_SimpleFunction('get_categories', [$this, 'getCategories']),
            new \Twig_SimpleFunction('get_categories_pager', [$this->categoryManager, 'findCategoriesPager']),

            new \Twig_SimpleFunction('get_post', [$this->postManager, 'findPostById']),
            new \Twig_SimpleFunction('get_posts', [$this, 'getPosts']),
            new \Twig_SimpleFunction('get_posts_pager', [$this->postManager, 'findPostsPager']),

            new \Twig_SimpleFunction('get_comment', [$this->commentManager, 'findCommentById']),
            new \Twig_SimpleFunction('get_comments', [$this, 'getComments']),
            new \Twig_SimpleFunction('get_comments_pager', [$this->commentManager, 'findCommentsPager']),
        ];
    }
public function getFunctions(): array
    {
        return [
            new \Twig_SimpleFunction('get_category', [$this->categoryManager, 'findCategoryById']),
            new \Twig_SimpleFunction('get_category_by_slug', [$this->categoryManager, 'findCategoryBySlug']),
            new \Twig_SimpleFunction('get_categories', [$this, 'getCategories']),
            new \Twig_SimpleFunction('get_categories_pager', [$this->categoryManager, 'findCategoriesPager']),

            new \Twig_SimpleFunction('get_post', [$this->postManager, 'findPostById']),
            new \Twig_SimpleFunction('get_posts', [$this, 'getPosts']),
            new \Twig_SimpleFunction('get_posts_pager', [$this->postManager, 'findPostsPager']),

            new \Twig_SimpleFunction('get_comment', [$this->commentManager, 'findCommentById']),
            new \Twig_SimpleFunction('get_comments', [$this, 'getComments']),
            new \Twig_SimpleFunction('get_comments_pager', [$this->commentManager, 'findCommentsPager']),
        ];
    }
{@inheritdoc}