/**
   * Constructor.
   *
   * Available options:
   *
   *  * choices:         An array of possible choices (required)
   *  * label_separator: The separator to use between the input radio and the label
   *  * separator:       The separator to use between each input radio
   *  * class:           The class to use for the main <ul> tag
   *  * formatter:       A callable to call to format the radio choices
   *                     The formatter callable receives the widget and the array of inputs as arguments
   *  * template:        The template to use when grouping option in groups (%group% %options%)
   *
   * @param array $options     An array of options
   * @param array $attributes  An array of default HTML attributes
   *
   * @see sfWidgetFormChoiceBase
   */
 protected function configure($options = array(), $attributes = array())
  {
    parent::configure($options, $attributes);

    $this->addOption('class', 'radio_list');
    $this->addOption('label_separator', '');
    $this->addOption('separator', "\n");
    $this->addOption('formatter', array($this, 'formatter'));
    $this->addOption('template', '%group% %options%');

/*
    $arr = array (
      '1' => 'Mo',
      '2' => 'Di',
      3 => 'Mi',
      4 => 'Do',
      5 => 'Fr',
      6 => 'Sa',
      7 => 'So'
    );

    $this->setOption('choices', $arr);
*/
    
  }
  /**
   * Constructorz
   *
   * Available options:
   *
   *  * choices:         An array of possible choices (required)
   *  * label_separator: The separator to use between the input radio and the label
   *  * separator:       The separator to use between each input radio
   *  * class:           The class to use for the main <ul> tag
   *  * formatter:       A callable to call to format the radio choices
   *                     The formatter callable receives the widget and the array of inputs as arguments
   *  * template:        The template to use when grouping option in groups (%group% %options%)
   *
   * @param array $options     An array of options
   * @param array $attributes  An array of default HTML attributes
   *
   * @see sfWidgetFormChoiceBase
   */
 protected function configure($options = array(), $attributes = array())
  {
    parent::configure($options, $attributes);

    $this->addOption('class', 'radio_list');
    $this->addOption('label_separator', '');
    $this->addOption('separator', "\n");
    $this->addOption('formatter', array($this, 'formatter'));
    $this->addOption('template', '%group% %options%');
  }
 /**
  * Constructor.
  *
  * Available options:
  *
  *  * choices:         An array of possible choices (required)
  *  * label_separator: The separator to use between the input radio and the label
  *  * separator:       The separator to use between each input radio
  *  * formatter:       A callable to call to format the radio choices
  *                     The formatter callable receives the widget and the array of inputs as arguments
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *   
  * @see sfWidgetForm
  */
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     $this->addOption('choices', array());
     $this->addOption('is_ternary', false);
     $this->setOption('separator', '&nbsp;');
     $this->setOption('label_separator', '');
     $this->setOption('formatter', array($this, 'ternaryFormat'));
     if (isset($options['is_ternary']) && $options['is_ternary'] == true) {
         $this->setOption('choices', array('1' => 'yes', '0' => 'no', '' => 'unknown'));
     }
 }
예제 #4
0
 /**
  * DOCUMENT ME
  * @param mixed $options
  * @param mixed $attributes
  */
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
 }
 protected function configure($options = array(), $attributes = array())
 {
     $this->addRequiredOption('image_prefix');
     parent::configure($options, $attributes);
 }