65 lines
1.7 KiB
PHP
65 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace Trinity\Bundle\NotificationBundle\Configuration;
|
|
|
|
class TemplateCrudConfiguration extends \Trinity\Bundle\AdminBundle\Configuration\CrudConfiguration
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this
|
|
->setModelNamespace('Trinity\\Bundle\\NotificationBundle\\Model')
|
|
->setModel('Template')
|
|
->setModelPeer('TemplatePeer')
|
|
->setModelQuery('TemplateQuery')
|
|
|
|
->setRoutePrefix('TrinityNotificationBundleTemplateAdmin')
|
|
|
|
->setFormNamespace('Trinity\\Bundle\\NotificationBundle\\Form\Type')
|
|
|
|
->setFormEdit('TemplateType')
|
|
->setFormFilter('TemplateFilterType')
|
|
->setFormNew('TemplateType')
|
|
|
|
->setFieldsets(array(
|
|
'' => array(
|
|
'*',
|
|
),
|
|
))
|
|
|
|
->setMaxPerPage(100)
|
|
|
|
->setRankable(false)
|
|
|
|
->setListTitle('Templates notifications')
|
|
->setNewTitle('New template notification')
|
|
->setEditTitle('Edition of "%reference%"')
|
|
|
|
->setDisplayFields(array(
|
|
'reference',
|
|
'description',
|
|
))
|
|
|
|
->setFieldsets(
|
|
array(
|
|
'' => array(
|
|
'reference',
|
|
'description',
|
|
),
|
|
'Contents' => array(
|
|
'content',
|
|
'logContent',
|
|
)
|
|
)
|
|
)
|
|
|
|
// Listing:
|
|
|
|
// ->setFieldTemplate('visible', 'TrinityAdminBundle:BaseAdmin:bool.html.twig')
|
|
// ->setDisplayFields(array(
|
|
//
|
|
// ))
|
|
// ->setFieldname('foo', 'bar')
|
|
;
|
|
}
|
|
}
|