本文整理汇总了PHP中Symfony\Component\Form\Form::configure方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::configure方法的具体用法?PHP Form::configure怎么用?PHP Form::configure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\Form\Form
的用法示例。
在下文中一共展示了Form::configure方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configure
protected function configure()
{
parent::configure();
$this->add(new HiddenField('id'));
$this->add(new TextField('name'));
$this->add(new CheckboxField('isActive'));
}
示例2: configure
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)));
}
示例3: configure
/**
* {@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'));
}
示例4: configure
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'));
}
示例5: configure
/**
* 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();
}
示例6: configure
protected function configure()
{
$this->testCase->assertEquals($this->object, $this->getData());
parent::configure();
}