本文整理匯總了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);
}
示例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);
}
示例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);
}
示例4: __construct
public function __construct($testCase, $name, $object, $validator)
{
$this->testCase = $testCase;
$this->object = $object;
parent::__construct($name, $object, $validator);
}
示例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);
}
示例6: __construct
public function __construct($title, array $options = array())
{
$this->addOption('theme');
$this->addOption('post_class');
parent::__construct($title, $options);
}
示例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);
}