예제 #1
0
파일: FileField.php 프로젝트: rosstuck/Pok
 /**
  * {@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'));
 }
예제 #2
0
 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();
 }