59 lines
1.3 KiB
PHP
59 lines
1.3 KiB
PHP
<?php
|
||
|
||
namespace Trinity\Bundle\NotificationBundle\Form\Type;
|
||
|
||
use Propel\PropelBundle\Form\BaseAbstractType;
|
||
use Symfony\Component\Form\FormBuilderInterface;
|
||
|
||
class NotificationFilterType extends BaseAbstractType
|
||
{
|
||
protected $options = array(
|
||
'data_class' => 'Trinity\Bundle\NotificationBundle\Model\Notification',
|
||
'name' => 'notification',
|
||
'csrf_protection' => false,
|
||
);
|
||
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||
{
|
||
$builder->add(
|
||
'templateId',
|
||
'model',
|
||
array(
|
||
'required' => false,
|
||
'class' => 'Trinity\Bundle\NotificationBundle\Model\Template',
|
||
'attr' => array(
|
||
'class' => 'chosen-select',
|
||
)
|
||
)
|
||
);
|
||
|
||
$builder->add(
|
||
'isRead',
|
||
'filter_boolean'
|
||
);
|
||
|
||
$builder->add(
|
||
'userId',
|
||
'model',
|
||
array(
|
||
'required' => false,
|
||
'class' => 'FOS\UserBundle\Propel\User',
|
||
'attr' => array(
|
||
'class' => 'chosen-select',
|
||
)
|
||
)
|
||
);
|
||
|
||
$builder->add(
|
||
'logContentRender',
|
||
'text',
|
||
array(
|
||
'required' => false,
|
||
)
|
||
);
|
||
}
|
||
}
|