src/Form/GameType.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use Symfony\Component\Form\AbstractType;
  4. use Symfony\Component\Form\FormBuilderInterface;
  5. use Symfony\Component\Form\Extension\Core\Type\SubmitType;
  6. use Symfony\Component\Form\Extension\Core\Type\TextType;
  7. use Symfony\Component\OptionsResolver\OptionsResolver;
  8. class GameType extends AbstractType
  9. {
  10.     public function buildForm(FormBuilderInterface $builder, array $options)
  11.     {
  12.         $builder
  13.             ->add('hunter-1'TextType::class, [
  14.                 'label' => 'First hunter',
  15.                 'mapped' => false,
  16.                 'translation_domain' => 'locale'
  17.             ])
  18.             ->add('hunter-2'TextType::class, [
  19.                 'label' => 'Second hunter',
  20.                 'mapped' => false,
  21.                 'translation_domain' => 'locale',
  22.                 'required' => false
  23.             ])
  24.             ->add('hunter-3'TextType::class, [
  25.                 'label' => 'Third hunter',
  26.                 'mapped' => false,
  27.                 'translation_domain' => 'locale',
  28.                 'required' => false
  29.             ])
  30.             ->add('hunter-4'TextType::class, [
  31.                 'label' => 'Fourth hunter',
  32.                 'mapped' => false,
  33.                 'translation_domain' => 'locale',
  34.                 'required' => false
  35.             ])
  36.             ->add('submit'SubmitType::class, [
  37.                 'attr' => [
  38.                     'class' => 'btn'
  39.                 ],
  40.                 'translation_domain' => 'locale',
  41.                 'label' => 'Generate game'
  42.             ])
  43.         ;
  44.     }
  45.     public function configureOptions(OptionsResolver $resolver)
  46.     {}
  47. }