AttributeDataTrait
This is the 'data' attribute trait.
This trait has been created to share common code between form elements classes, in this case the declaration of the 'data' attribute and its set/get methods.
Tags
Table of Contents
$data | : mixed | |
---|---|---|
getData() | This method returns the current value of the 'data' attribute. | : string |
setData() | This method sets the 'data' attribute with the given value and returns self. | : self |
Properties
$data
protected
mixed
$data
= null
Methods
getData()
This method returns the current value of the 'data' attribute.
public
getData() : string
Return values
string —setData()
This method sets the 'data' attribute with the given value and returns self.
public
setData(mixed $data) : self
Parameters
- $data : mixed