protected function configure() { parent::configure(); $this->add(new HiddenField('id')); $this->add(new TextField('name')); $this->add(new CheckboxField('isActive')); }
protected function configure() { parent::configure(); $this->add(new Form\TextField('title')); $this->add(new Form\TextField('author')); $this->add(new Form\TextField('copyright')); $this->add(new Form\ChoiceField('defaultKey', array('choices' => array('C' => 'C', 'C#' => 'C#', 'Db' => 'Db', 'D' => 'D', 'D#' => 'D#', 'Eb' => 'Eb', 'E' => 'E', 'F' => 'F', 'F#' => 'F#', 'Gb' => 'Gb', 'G' => 'G', 'G#' => 'G#', 'Ab' => 'Ab', 'A' => 'A', 'A#' => 'A#', 'Bb' => 'Bb', 'B' => 'B')))); $this->add(new Form\TextareaField('chordSheet', array('required' => false))); }
/** * {@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() { parent::configure(); $this->add(new HiddenField('id')); $this->add(new TextField('name')); $this->add(new RepeatedField(new TextField('email'))); $this->add(new RepeatedField(new PasswordField('passwd'))); $this->add(new CheckboxField('isActive')); }
/** * Available options: * * * modifiable: If true, elements in the collection can be added * and removed by the presence of absence of the * corresponding field groups. Field groups could be * added or removed via Javascript and reflected in * the underlying collection. Default: false. */ 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(); }
protected function configure() { $this->testCase->assertEquals($this->object, $this->getData()); parent::configure(); }