LabelTrait
This is the 'label' trait.
This trait has been created to share common code between form element classes, in this case the declaration of the 'label' tag and its set/get methods.
Tags
Table of Contents
$label | : string | |
---|---|---|
getLabelFor() | This method returns the label tag output. | : string |
setLabelFor() | This method sets the 'label' tag with the given value and returns self. | : self |
Properties
$label
protected
string
$label
= ''
Methods
getLabelFor()
This method returns the label tag output.
public
getLabelFor([bool $required = false ]) : string
Parameters
- $required : bool = false
Return values
string —setLabelFor()
This method sets the 'label' tag with the given value and returns self.
public
setLabelFor(string $label) : self
Parameters
- $label : string