Ejemplo n.º 1
0
 /**
  * FormHandler::radioButton()
  *
  * Create a radioButton on the form
  *
  * @param string $title The title of the field
  * @param string $name The name of the field
  * @param array $options The options used for the field
  * @param string $validator The validator which should be used to validate the value of the field
  * @param boolean $useArrayKeyAsValue If the array key's are the values for the options in the field
  * @param string $extra CSS, Javascript or other which are inserted into the HTML tag
  * @param string $mask if more the 1 options are given, glue the fields together with this mask
  * @return \FormHandler\Field\Radio
  * @author Teye Heimans
  * @deprecated Use \FormHandler\Field\Radio::set() instead
  */
 public function radioButton($title, $name, $options, $validator = null, $useArrayKeyAsValue = null, $extra = null, $mask = null)
 {
     $field = \FormHandler\Field\Radio::set($this, $title, $name);
     return $field->setValidator(self::parseValidator($validator, $field))->setOptions($options)->useArrayKeyAsValue($useArrayKeyAsValue)->setExtra($extra)->setMask($mask);
 }
Ejemplo n.º 2
0
 public static function set(\FormHandler\FormHandler $form, $title, $name, $validator = null)
 {
     $field = parent::set($form, $title, $name);
     $field->setValidator(FormHandler::parseValidator($validator, $field));
     return $field;
 }