deblan.tv/vendor/trinity/src/Trinity/.svn/pristine/eb/eb687b72f7a65b16d56bb61bfda7fec0aae0cfa3.svn-base
2015-03-02 21:57:49 +01:00

54 lines
1.7 KiB
Plaintext

<?php
namespace Trinity\Bundle\NotificationBundle\Configuration;
class NotificationCrudConfiguration extends \Trinity\Bundle\AdminBundle\Configuration\CrudConfiguration
{
public function __construct()
{
$this
->setModelNamespace('Trinity\\Bundle\\NotificationBundle\\Model')
->setModel('Notification')
->setModelPeer('NotificationPeer')
->setModelQuery('NotificationQuery')
->setRoutePrefix('TrinityNotificationBundleNotificationAdmin')
->setFormNamespace('Trinity\\Bundle\\NotificationBundle\\Form\Type')
->setFormEdit('NotificationType')
->setFormFilter('NotificationFilterType')
->setFormNew('NotificationType')
->setFieldsets(array(
'' => array(
'*',
),
))
->setMaxPerPage(20)
->setSort('orderByCreatedAt', \Criteria::DESC)
->setRankable(false)
->setListTitle('Notifications')
->removeIndexAction('new')
->removeIndexListAction('edit')
->setDisplayFields(array(
'user_id',
'is_read',
'log_content_render',
'created_at',
))
->setFieldTemplate('is_read', 'TrinityAdminBundle:BaseAdmin:bool.html.twig')
->setFieldTemplate('user_id', 'TrinityNotificationBundle:NotificationAdmin:user.html.twig')
->setDisplayFieldAttrs('user_id', array('width' => 80))
->setDisplayFieldAttrs('is_read', array('width' => 80))
->setDisplayFieldAttrs('created_at', array('width' => 120))
;
}
}