Event CRUD generated

This commit is contained in:
Marc Ducobu
2016-03-22 17:16:19 +01:00
parent acd25fc57b
commit 4d02314770
9 changed files with 466 additions and 0 deletions

43
Form/EventType.php Normal file
View File

@@ -0,0 +1,43 @@
<?php
namespace Chill\EventBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class EventType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('label')
->add('date')
->add('center')
->add('type')
->add('circle')
;
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'Chill\EventBundle\Entity\Event'
));
}
/**
* @return string
*/
public function getName()
{
return 'chill_eventbundle_event';
}
}