add basic crud for admin

This commit is contained in:
2016-03-18 11:34:25 +01:00
parent cd7e9a9e2b
commit 9512528018
27 changed files with 1413 additions and 4 deletions

40
Form/EventTypeType.php Normal file
View File

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

41
Form/RoleType.php Normal file
View File

@@ -0,0 +1,41 @@
<?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('label')
->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';
}
}

41
Form/StatusType.php Normal file
View File

@@ -0,0 +1,41 @@
<?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('label')
->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';
}
}