12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace App\Form;
- use Symfony\Component\Form\AbstractType;
- use Symfony\Component\Form\FormBuilderInterface;
- use Symfony\Component\OptionsResolver\OptionsResolver;
- use Symfony\Component\Form\Extension\Core\Type\TextType;
- class GenreType extends AbstractType
- {
- /**
- * {@inheritdoc}
- */
- public function buildForm(FormBuilderInterface $builder, array $options)
- {
- $builder->add('name', TextType::class, array(
- 'label' => false,
- 'row_attr' => ['class' => 'input-group']
- ));
- }/**
- * {@inheritdoc}
- */
- public function configureOptions(OptionsResolver $resolver)
- {
- $resolver->setDefaults(array(
- 'data_class' => 'App\Entity\Genre'
- ));
- }
- /**
- * {@inheritdoc}
- */
- public function getBlockPrefix() : string
- {
- return 'App_genre';
- }
- }
|