chill-bundles/Form/StatusType.php
Julien Fastré d8de53ca3c rename 'label' to 'name'.
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
2016-03-24 23:30:37 +01:00

42 lines
916 B
PHP

<?php
namespace Chill\EventBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class StatusType 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\Status'
));
}
/**
* @return string
*/
public function getName()
{
return 'chill_eventbundle_status';
}
}