public function __construct($name = '', $value = '') { $this->attrName = $name; $this->attrValue = $value; // Set the wrapper. $wrapper = new Div(); $wrapper->addClass('checkbox'); $this->wrap($wrapper); return $this; }
public function __construct($value = '', $name = '') { $this->value($value); if (strlen($name) > 0) { $this->name($name); } // Set the wrapper. $wrapper = new Div(); $wrapper->addClass('radio'); $this->wrap($wrapper); return $this; }