27 lines
776 B
PHP
27 lines
776 B
PHP
<?php
|
|
|
|
namespace Deblan\Bundle\BlogBundle\Page;
|
|
|
|
use Trinity\Bundle\ContentManagerBundle\Model\Page;
|
|
|
|
class CategoryPage extends HomePage
|
|
{
|
|
public function __construct($template = 'DeblanBlogBundle:Default:category.html.twig')
|
|
{
|
|
parent::__construct($template);
|
|
}
|
|
|
|
public function getConfiguration()
|
|
{
|
|
return $this->configuration
|
|
->setDataModel('\Deblan\Bundle\BlogBundle\Model\Category', 'Catégorie')
|
|
->setDefaultController('DeblanBlogBundle:Default:category')
|
|
->setDefaultControllerClass('Deblan\Bundle\BlogBundle\Controller\DefaultController::categoryAction');
|
|
}
|
|
|
|
public function getQuery()
|
|
{
|
|
return $this->query = parent::getQuery()->filterByCategory($this->getObject());
|
|
}
|
|
}
|