Exemple #1
0
 /**
  * Form builder
  *
  * @param FormBuilderInterface $builder
  * @param array $options
  *
  * @return null
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('title', TextType::class, array('label' => 'Product.title.label'));
     $builder->add('label', TextType::class, array('label' => 'Product.label.label'));
     $builder->add('description', TextareaType::class, array('label' => 'Product.description.label'));
     $builder->add('price', NumberType::class, array('label' => 'Product.price.label'));
     $builder->add('vat', NumberType::class, array('label' => 'Product.vat.label'));
     $builder->add('lockout', ChoiceType::class, array('label' => 'Product.lockout.label', 'choices_as_values' => true, 'choices' => OnlineProduct::choiceLockout(), 'attr' => array('choice_label_trans' => true)));
 }
 /**
  * Form builder
  *
  * @param FormBuilderInterface $builder
  * @param array $options
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('lockout', ChoiceType::class, array('label' => 'Product.lockout.label', 'choices_as_values' => true, 'choices' => OnlineProduct::choiceLockout(), 'attr' => array('choice_label_trans' => true)));
 }