Пример #1
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('returnTransform', 'choice', ['label' => 'On overflow', 'required' => true, 'choices' => IntegerOverflow::getReturnTransformsLabels(), 'constraints' => [new Choice(['choices' => IntegerOverflow::getAllowedReturnTransforms()])], 'attr' => ['class' => 'form-control']]);
     $builder->add('customValue', null, ['attr' => ['class' => 'form-control']]);
     $builder->add('actionOnNotNumeric', 'choice', ['label' => 'Action if not a number', 'required' => true, 'choices' => IntegerOverflow::getNotNumericActionsLabels(), 'constraints' => [new Choice(['choices' => IntegerOverflow::getAllowedNotNumericActions()])], 'attr' => ['class' => 'form-control']]);
 }
Пример #2
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('blind', 'checkbox', ['required' => false]);
 }