Back to CMSWebApplicationInterface class

Method setUserState

public mixed|void
setUserState
(mixed $key, mixed $value)
Sets the value of a user state variable.
Parameters
  • string $key The path of the state.
  • mixed $value The value of the variable.
Returns
  • mixed|void The previous state, if one existed. Void otherwise.
Since
  • 4.0.0

Method setUserState - Source code

/**
 * Sets the value of a user state variable.
 *
 * @param   string  $key    The path of the state.
 * @param   mixed   $value  The value of the variable.
 *
 * @return  mixed|void  The previous state, if one existed. Void otherwise.
 *
 * @since   4.0.0
 */
public function setUserState($key, $value);