當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Form::configure方法代碼示例

本文整理匯總了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'));
 }
開發者ID:faridos,項目名稱:ServerGroveLiveChat,代碼行數:7,代碼來源:OperatorDepartmentForm.php

示例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)));
 }
開發者ID:rogchap,項目名稱:Diakonia,代碼行數:9,代碼來源:SongForm.php

示例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'));
 }
開發者ID:faridos,項目名稱:ServerGroveLiveChat,代碼行數:12,代碼來源:FileField.php

示例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'));
 }
開發者ID:faridos,項目名稱:ServerGroveLiveChat,代碼行數:9,代碼來源:OperatorForm.php

示例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();
 }
開發者ID:nickaggarwal,項目名稱:sample-symfony2,代碼行數:20,代碼來源:CollectionField.php

示例6: configure

 protected function configure()
 {
     $this->testCase->assertEquals($this->object, $this->getData());
     parent::configure();
 }
開發者ID:rsky,項目名稱:symfony,代碼行數:5,代碼來源:FormTest.php


注:本文中的Symfony\Component\Form\Form::configure方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。