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


PHP Form::__construct方法代碼示例

本文整理匯總了PHP中Symfony\Component\Form\Form::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Form::__construct方法的具體用法?PHP Form::__construct怎麽用?PHP Form::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Symfony\Component\Form\Form的用法示例。


在下文中一共展示了Form::__construct方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * {@inheritDoc}
  */
 public function __construct($key, array $options = array())
 {
     // Override parent option
     // \DateTime objects are never edited by reference, because
     // we treat them like value objects
     $this->addOption('by_reference', false);
     parent::__construct($key, $options);
 }
開發者ID:yproximite,項目名稱:symfony-legacy-form,代碼行數:11,代碼來源:TimeField.php

示例2: __construct

 public function __construct($title, array $options)
 {
     $this->addOption('theme');
     $this->addOption('topic_class');
     $this->addOption('category_repository');
     $this->addOption('post_form');
     parent::__construct($title, $options);
 }
開發者ID:hex337,項目名稱:ForumBundle,代碼行數:8,代碼來源:NewTopicForm.php

示例3: __construct

 public function __construct($key, array $options = array())
 {
     // This doesn't work with addOption(), because the value of this option
     // needs to be accessed before Configurable::__construct() is reached
     // Setting all options in the constructor of the root field
     // is conceptually flawed
     if (isset($options['prototype'])) {
         $this->prototype = $options['prototype'];
         unset($options['prototype']);
     }
     parent::__construct($key, $options);
 }
開發者ID:nickaggarwal,項目名稱:sample-symfony2,代碼行數:12,代碼來源:CollectionField.php

示例4: __construct

 public function __construct($testCase, $name, $object, $validator)
 {
     $this->testCase = $testCase;
     $this->object = $object;
     parent::__construct($name, $object, $validator);
 }
開發者ID:rsky,項目名稱:symfony,代碼行數:6,代碼來源:FormTest.php

示例5: __construct

 /**
  * Constructor.
  *
  * @param string $name
  * @param array|object $data
  * @param ValidatorInterface $validator
  * @param array $options
  */
 public function __construct($name, array $options = array())
 {
     $this->addOption('theme');
     parent::__construct($name, $options);
 }
開發者ID:KnpLabs,項目名稱:KnpUserBundle,代碼行數:13,代碼來源:GroupForm.php

示例6: __construct

 public function __construct($title, array $options = array())
 {
     $this->addOption('theme');
     $this->addOption('post_class');
     parent::__construct($title, $options);
 }
開發者ID:hex337,項目名稱:ForumBundle,代碼行數:6,代碼來源:PostForm.php

示例7: __construct

    /**
     * Constructor.
     *
     * @param string $name
     * @param array|object $data
     * @param ValidatorInterface $validator
     * @param array $options
     */
    public function __construct($name, $data, ValidatorInterface $validator, array $options = array())
    {
        $this->addOption('theme');

        parent::__construct($name, $data, $validator, $options);
    }
開發者ID:naderman,項目名稱:UserBundle,代碼行數:14,代碼來源:GroupForm.php


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