Back to Joomla project (class list)

Class StateBehaviorTrait - list of methods

Trait which supports state behavior
Package: Joomla\CMS\MVC\Model
Copyright: (C) 2019 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE
Located at: Joomla/MVC/Model/StateBehaviorTrait.php
Project: Joomla

Method Summary

public mixed
(mixed $property = null, mixed $default = null)

Method to get state variables.
Parameters
  • string $property Optional parameter name
  • mixed $default Optional default value
Returns
  • mixed The property where specified, the state object where omitted
Since
  • 4.0.0
Show source code of this method: getState Source Code

public mixed
(mixed $property, mixed $value = null)

Method to set state variables.
Parameters
  • string $property The name of the property
  • mixed $value The value of the property to set or null
Returns
  • mixed The previous value of the property or null if not set
Since
  • 4.0.0
Show source code of this method: setState Source Code

protected void
()

Method to auto-populate the state.
Returns
  • void
Since
  • 4.0.0
-
  • Calling getState in this method will result in recursion.
Show source code of this method: populateState Source Code

Properties Summary

protected bool
$__state_set
Indicates if the internal state has been set
Since
  • 4.0.0
protected \Joomla\CMS\Object\CMSObject
$state
A state object
Since
  • 4.0.0

Tags Summary

Since
4.0.0