mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 14:24:24 +00:00
Warning : this commit require to rename some table column, but the original Version file has been update. If you do not care to loose your date, you may run : ``` php app/console doctrine:migrations:execute --down 20160318111334 php app/console doctrine:migrations:execute --up 20160318111334 php app/console doctrine:cache:metadata #(if you have a cache for doctrine meta date) ``` close #20
42 lines
910 B
PHP
42 lines
910 B
PHP
<?php
|
|
|
|
namespace Chill\EventBundle\Form;
|
|
|
|
use Symfony\Component\Form\AbstractType;
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
|
|
|
class RoleType extends AbstractType
|
|
{
|
|
/**
|
|
* @param FormBuilderInterface $builder
|
|
* @param array $options
|
|
*/
|
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
|
{
|
|
$builder
|
|
->add('name')
|
|
->add('active')
|
|
->add('type')
|
|
;
|
|
}
|
|
|
|
/**
|
|
* @param OptionsResolverInterface $resolver
|
|
*/
|
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
|
{
|
|
$resolver->setDefaults(array(
|
|
'data_class' => 'Chill\EventBundle\Entity\Role'
|
|
));
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getName()
|
|
{
|
|
return 'chill_eventbundle_role';
|
|
}
|
|
}
|