本文整理汇总了PHP中sfWidgetForm::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP sfWidgetForm::__construct方法的具体用法?PHP sfWidgetForm::__construct怎么用?PHP sfWidgetForm::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfWidgetForm
的用法示例。
在下文中一共展示了sfWidgetForm::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor.
*
* Available options:
*
* * public_key: Your reCAPTCHA public key (app_recaptcha_private_key by default)
* * error: A reCAPTCHA error code
* * use_ssl: Use a secure connection (false by default)
*
* @param array $options An array of options
* @param array $messages An array of error messages
*
* @see sfWidgetForm
*/
public function __construct($options = array(), $attributes = array())
{
$this->addOption('public_key', sfConfig::get('app_recaptcha_public_key'));
$this->addOption('error', null);
$this->addOption('use_ssl', false);
parent::__construct($options, $attributes);
}
示例2: __construct
public function __construct($options = array(), $attributes = array())
{
$this->addOption('empty_value', ' ');
$this->addOption('value_callback', null);
$this->addOption('plain', true);
parent::__construct($options, $attributes);
}
示例3: __construct
/**
* Constructor.
*
* @param array $options An array of options
* @param array $attributes An array of default HTML attributes
*
* @see sfWidgetForm
*/
public function __construct($options = array(), $attributes = array())
{
$this->addRequiredOption('widget');
$this->addOption('is_edit_public_flag', false);
$this->addOption('public_flag_default', 1);
$this->addOption('template', '%input%<br>%public_flag%');
parent::__construct($options, $attributes);
$this->setLabel($this->getOption('widget')->getLabel());
}
示例4: __construct
public function __construct($options = array(), $attributes = array())
{
$this->addOption('object', null);
$this->addOption('method', null);
$this->addOption('method_args', null);
$this->addOption('add_hidden_input', false);
$this->addOption('true_string', 'Yes');
$this->addOption('false_string', 'No');
parent::__construct($options, $attributes);
}
示例5: __construct
public function __construct($options = array(), $attributes = array())
{
$this->addOption('object');
$this->addOption('method', '__toString');
$this->addOption('method_args', null);
$this->addOption('use_retrieved_value', true);
$this->addOption('empty_value', ' ');
$this->addOption('add_hidden_input', false);
$this->addOption('value_callback', null);
parent::__construct($options, $attributes);
}
示例6: __construct
public function __construct($options = array(), $attributes = array())
{
$this->addOption('object', null);
$this->addOption('method', null);
$this->addOption('empty_value', ' ');
$this->addOption('collapse', false);
$this->addOption('restrict_size', false);
$this->addOption('restricted_size', 125);
$this->addOption('add_hidden_input', false);
$this->addOption('hidden_input_value', null);
$this->addOption('value_callback', null);
$this->addOption('to_string_method', '__toString');
parent::__construct($options, $attributes);
}
示例7: __construct
/**
* Constructor.
*
* The first argument can be:
*
* * null
* * an array of sfWidget instances
*
* Available options:
*
* * name_format: The sprintf pattern to use for input names
* * form_formatter: The form formatter name (table and list are bundled)
*
* @param mixed $fields Initial fields
* @param array $options An array of options
* @param array $attributes An array of default HTML attributes
* @param array $labels An array of HTML labels
* @param array $helps An array of help texts
*
* @see sfWidgetForm
*/
public function __construct($fields = null, $options = array(), $attributes = array(), $labels = array(), $helps = array())
{
$this->addOption('name_format', '%s');
$this->addOption('form_formatter', null);
parent::__construct($options, $attributes);
if (is_array($fields)) {
foreach ($fields as $name => $widget) {
$this[$name] = $widget;
}
} else {
if (!is_null($fields)) {
throw new InvalidArgumentException('sfWidgetFormSchema constructor takes an array of sfWidget objects.');
}
}
$this->setLabels($labels);
$this->helps = $helps;
}
示例8: __construct
public function __construct($options = array(), $attributes = array())
{
parent::__construct($options, $attributes);
$this->validateOptions();
}
示例9: __construct
public function __construct($options = array(), $attributes = array())
{
$this->addOption('type', 'text');
parent::__construct($options, $attributes);
}