Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function buildCreateForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('reference', 'text', ['data' => $options['data']->getId() ? 'https://www.youtube.com/watch?v=' . $options['data']->getReference() : '', 'label' => $this->translator->trans('youtube.reference.label'), 'constraints' => [new NotBlank(), new Url(), new YoutubeUrl()]])->add('thumb', 'mediapicker', ['multiple' => false, 'property' => 'name', 'class' => $this->mediaManager->getClass()])->add('add ' . $options['provider']->getLabel(), 'submit');
 }