public function __construct($args = array()) { $args = PSU::params($args); $args['type'] = 'radio'; parent::__construct($args); $this->selected = array(); }
/** * */ public function attributes2string() { $name = $this->name->value; $this->name->value .= "[]"; $s = parent::attributes2string(); $this->name->value = $name; return $s; }
/** * Custom setter to handle "multiple" HTMLAttribute */ public function __set($k, $v) { if ($k == 'multiple') { if ($v instanceof HTMLAttribute) { $v->value = $v->value ? 'multiple' : ''; } else { $v = $v ? 'multiple' : ''; } } parent::__set($k, $v); }