Exemplo n.º 1
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('file', 'file', ['label' => $this->__('Change file'), 'mapped' => false, 'required' => false])->add('downloadAllowed', 'checkbox', ['required' => false, 'label' => $this->__('Allow download')]);
 }
Exemplo n.º 2
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     $builder->add('url', isset($options['hiddenFields']) && in_array('url', $options['hiddenFields']) ? 'hidden' : 'url');
 }