Back to CMSWebApplicationInterface class

Method getUserStateFromRequest

public mixed
getUserStateFromRequest
(mixed $key, mixed $request, mixed $default = null, mixed $type = 'none')
Gets the value of a user state variable.
Parameters
  • string $key The key of the user state variable.
  • string $request The name of the variable passed in a request.
  • string $default The default value for the variable if not found. Optional.
  • string $type Filter for the variable, for valid values see {@link InputFilter::clean()}. Optional.
Returns
  • mixed The request user state.
Since
  • 4.0.0

Method getUserStateFromRequest - Source code

/**
 * Gets the value of a user state variable.
 *
 * @param   string  $key      The key of the user state variable.
 * @param   string  $request  The name of the variable passed in a request.
 * @param   string  $default  The default value for the variable if not found. Optional.
 * @param   string  $type     Filter for the variable, for valid values see {@link InputFilter::clean()}. Optional.
 *
 * @return  mixed  The request user state.
 *
 * @since   4.0.0
 */
public function getUserStateFromRequest($key, $request, $default = null, $type = 'none');