/**
  * 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
0
 public function __construct($options = array(), $attributes = array())
 {
     $this->addOption('empty_value', ' ');
     $this->addOption('value_callback', null);
     $this->addOption('plain', true);
     parent::__construct($options, $attributes);
 }
 /**
  * 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());
 }
 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
0
 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', '&nbsp;');
     $this->addOption('add_hidden_input', false);
     $this->addOption('value_callback', null);
     parent::__construct($options, $attributes);
 }
 public function __construct($options = array(), $attributes = array())
 {
     $this->addOption('object', null);
     $this->addOption('method', null);
     $this->addOption('empty_value', '&nbsp;');
     $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);
 }
 /**
  * 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;
 }
 public function __construct($options = array(), $attributes = array())
 {
     parent::__construct($options, $attributes);
     $this->validateOptions();
 }
 public function __construct($options = array(), $attributes = array())
 {
     $this->addOption('type', 'text');
     parent::__construct($options, $attributes);
 }