/** * 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); }