<?php
namespace App\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\OptionsResolver\OptionsResolver;
class GameType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('hunter-1', TextType::class, [
'label' => 'First hunter',
'mapped' => false,
'translation_domain' => 'locale'
])
->add('hunter-2', TextType::class, [
'label' => 'Second hunter',
'mapped' => false,
'translation_domain' => 'locale',
'required' => false
])
->add('hunter-3', TextType::class, [
'label' => 'Third hunter',
'mapped' => false,
'translation_domain' => 'locale',
'required' => false
])
->add('hunter-4', TextType::class, [
'label' => 'Fourth hunter',
'mapped' => false,
'translation_domain' => 'locale',
'required' => false
])
->add('submit', SubmitType::class, [
'attr' => [
'class' => 'btn'
],
'translation_domain' => 'locale',
'label' => 'Generate game'
])
;
}
public function configureOptions(OptionsResolver $resolver)
{}
}