| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class UserExtraBettingType extends AbstractType |
||
| 11 | { |
||
| 12 | public function buildForm(FormBuilderInterface $builder, array $options) |
||
| 13 | { |
||
| 14 | $extrabet = $options['extrabet']; |
||
| 15 | $teams = $options['teams']; |
||
| 16 | $label = $options['label']; |
||
| 17 | $type = $options['type']; |
||
| 18 | |||
| 19 | $builder |
||
| 20 | ->setAction('/saveextrabet') |
||
| 21 | ->setMethod('POST') |
||
| 22 | ->add('text', ChoiceType::class, array( |
||
| 23 | 'label' => $label, |
||
| 24 | 'choices' => $teams, |
||
| 25 | 'data' => $extrabet ? $extrabet->getText() : null |
||
| 26 | )) |
||
| 27 | ->add('type', HiddenType::class, array( |
||
| 28 | 'data' => $type |
||
| 29 | )) |
||
| 30 | ; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function configureOptions(OptionsResolver $resolver) |
||
| 40 | )); |
||
| 41 | } |
||
| 42 | } |