45 lines
1.3 KiB
PHP
45 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace Trinity\Bundle\ContentManagerBundle\Configuration;
|
|
|
|
class PageCrudConfiguration extends \Trinity\Bundle\AdminBundle\Configuration\CrudConfiguration
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this
|
|
->setModelNamespace('Trinity\\Bundle\\ContentManagerBundle\\Model')
|
|
->setModel('Page')
|
|
->setModelPeer('PagePeer')
|
|
->setModelQuery('PageQuery')
|
|
|
|
->setRoutePrefix('TrinityContentManagerBundlePageAdmin')
|
|
|
|
->setFormNamespace('Trinity\\Bundle\\ContentManagerBundle\\Form\\Type')
|
|
->setFormFilter('PageFilterType')
|
|
->setFormNew('PageType')
|
|
|
|
->setMaxPerPage(20)
|
|
->setSort('orderByName', \Criteria::ASC)
|
|
|
|
->setListTitle('Pages')
|
|
->setNewTitle('New page')
|
|
->setEditTitle('Edition of "%toString%"')
|
|
|
|
->removeIndexAction('new')
|
|
|
|
->setDisplayFields(array(
|
|
'name',
|
|
'node_id',
|
|
'updated_at',
|
|
'created_at',
|
|
))
|
|
|
|
->setFieldTemplate('node_id','TrinityAdminBundle:BaseAdmin:bool.html.twig')
|
|
;
|
|
|
|
if (isset($this->index_actions['new'])) {
|
|
unset($this->index_actions['new']);
|
|
}
|
|
}
|
|
}
|