26 lines
692 B
PHP
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);
|
|
}
|
|
}
|