/** * Adds a class to the class attribute * * This is the preferred method of setting the element's class * * @param string $class the new class to add * @return $this */ public function addClass($class) { if ($this->label) { $this->label->addClass($class); } return parent::addClass($class); }
/** * Forgery constructor */ public function __forge() { $this->checkbox = Checkbox::forge()->removeClass('form-control'); $this->label = Label::forge()->removeClass('control-label'); $this->label->addContent($this->checkbox); $this->label->addClass('checkbox'); }