Back to CMSWebApplicationInterface class

Method getUserState

public mixed
getUserState
(mixed $key, mixed $default = null)
Gets a user state.
Parameters
  • string $key The path of the state.
  • mixed $default Optional default value, returned if the internal value is null.
Returns
  • mixed The user state or null.
Since
  • 4.0.0

Method getUserState - Source code

/**
 * Gets a user state.
 *
 * @param   string  $key      The path of the state.
 * @param   mixed   $default  Optional default value, returned if the internal value is null.
 *
 * @return  mixed  The user state or null.
 *
 * @since   4.0.0
 */
public function getUserState($key, $default = null);