/** * {@inheritDoc} */ protected function configure() { $this->addRequiredOption('secret'); $this->addOption('tmp_dir', sys_get_temp_dir()); parent::configure(); $this->add(new Field('file')); $this->add(new HiddenField('token')); $this->add(new HiddenField('original_name')); }
protected function configure() { $this->addOption('modifiable', false); if ($this->getOption('modifiable')) { $field = $this->newField('$$key$$', null); // TESTME $field->setRequired(false); $this->add($field); } parent::configure(); }