mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 14:24:24 +00:00
52 lines
1.2 KiB
PHP
52 lines
1.2 KiB
PHP
<?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',
|
|
'date',
|
|
array(
|
|
'required' => true,
|
|
'widget' => 'single_text',
|
|
'format' => 'dd-MM-yyyy'
|
|
)
|
|
)
|
|
->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';
|
|
}
|
|
}
|