コード例 #1
0
 /**
  * Builds the form.
  *
  * This method is called for each type in the hierarchy starting form the
  * top most type. Type extensions can further modify the form.
  *
  * @param FormBuilderInterface $builder The form builder
  * @param array                $options The options
  *
  * @see FormTypeExtensionInterface::buildForm()
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('type', ChoiceType::class, array('choices' => array('soundcloud' => 'soundcloud'), 'constraints' => array(new NotBlank()), 'required' => true));
 }
コード例 #2
0
 /**
  * Builds the form.
  *
  * This method is called for each type in the hierarchy starting form the
  * top most type. Type extensions can further modify the form.
  *
  * @param FormBuilderInterface $builder The form builder
  * @param array                $options The options
  *
  * @see FormTypeExtensionInterface::buildForm()
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('type', ChoiceType::class, array('choices' => $this->getRemoteVideoChoices(), 'constraints' => array(new NotBlank()), 'required' => true));
 }
コード例 #3
0
 /**
  * Builds the form.
  *
  * This method is called for each type in the hierarchy starting form the
  * top most type. Type extensions can further modify the form.
  *
  * @param FormBuilderInterface $builder The form builder
  * @param array                $options The options
  *
  * @see FormTypeExtensionInterface::buildForm()
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('type', ChoiceType::class, array('label' => 'media.form.remote_audio.type.label', 'choices' => array('soundcloud' => 'soundcloud'), 'constraints' => array(new NotBlank()), 'required' => true, 'choices_as_values' => true));
 }
コード例 #4
0
 /**
  * Builds the form.
  *
  * This method is called for each type in the hierarchy starting form the
  * top most type. Type extensions can further modify the form.
  *
  * @param FormBuilderInterface $builder The form builder
  * @param array                $options The options
  *
  * @see FormTypeExtensionInterface::buildForm()
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('type', 'choice', array('choices' => array('slideshare' => 'slideshare'), 'constraints' => array(new NotBlank()), 'required' => true));
 }
コード例 #5
0
 /**
  * Builds the form.
  *
  * This method is called for each type in the hierarchy starting form the
  * top most type. Type extensions can further modify the form.
  *
  * @param FormBuilderInterface $builder The form builder
  * @param array                $options The options
  *
  * @see FormTypeExtensionInterface::buildForm()
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('type', ChoiceType::class, array('label' => 'media.form.remote_video.type.label', 'choices' => $this->getRemoteVideoChoices($options['configuration']), 'constraints' => array(new NotBlank()), 'required' => true, 'choices_as_values' => true));
 }