本文整理匯總了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);
}