public function buildLabel($content, $for = '', $class = '', $attributes = [])
    {
        // Create new form label
        $element = new FormLabel($this->getHTMLDocument(), $content, $for, $attributes);

        // Add class
        $element->addClass($class);

        // Return form element
        return $element;
    }
public function buildLabel($content, $for = '', $class = '', $attributes = [])
    {
        // Create new form label
        $element = new FormLabel($this->getHTMLDocument(), $content, $for, $attributes);

        // Add class
        $element->addClass($class);

        // Return form element
        return $element;
    }
public function buildLabel ( $ content , $ for = '' , $ class = '' , $ attributes = [ ] ) { // Create new form label $ element = new FormLabel ( $ this -> getHTMLDocument ( ) , $ content , $ for , $ attributes ) ; // Add class $ element -> addClass ( $ class ) ; // Return form element return $ element ; }
Build an html form label.

@param string $content    The label content.
@param string $for        The input's id where this label is pointing to.
@param string $class      The extra class for the label.
@param array  $attributes A set of extra attributes

@return FormElement
@throws Exception
Build an html form label .