StateBehaviorTrait
Trait which supports state behavior
since |
4.0.0 |
---|---|
package |
Joomla CMS |
Methods
getState
Method to get state variables.
getState( property = null, default = null) :
since |
4.0.0 |
---|
Arguments
- property
string
Optional parameter name- default
mixed
Optional default value
Response
mixed
The property where specified, the state object where omitted
populateState
Method to auto-populate the state.
populateState() :
This method should only be called once per instantiation and is designed to be called on the first call to the getState() method unless the configuration flag to ignore the request is set.
note |
Calling getState in this method will result in recursion. |
---|---|
since |
4.0.0 |
Response
void
setState
Method to set state variables.
setState( property, value = null) :
since |
4.0.0 |
---|
Arguments
- property
string
The name of the property- value
mixed
The value of the property to set or null
Response
mixed
The previous value of the property or null if not set
Properties
__state_set
Indicates if the internal state has been set
since |
4.0.0 |
---|
Type(s)
bool