deblan.tv/src/Deblan/Bundle/BlogBundle/Page/TagPage.php
2015-03-02 21:57:49 +01:00

26 lines
692 B
PHP

<?php
namespace Deblan\Bundle\BlogBundle\Page;
use Trinity\Bundle\ContentManagerBundle\Model\Page;
class TagPage extends HomePage
{
public function __construct($template = 'DeblanBlogBundle:Default:tag.html.twig')
{
parent::__construct($template);
}
public function getConfiguration()
{
return $this->configuration
->setDefaultController('DeblanBlogBundle:Default:tag')
->setDefaultControllerClass('Deblan\Bundle\BlogBundle\Controller\DefaultController::tagAction');
}
public function getQuery()
{
return $this->query = parent::getQuery()->filterByTags('%'.$this->getObject().'%', \Criteria::LIKE);
}
}