BackendUserConfiguration
Convenience wrapper for backend user configuration
Table of Contents
Properties
Methods
- __construct() : mixed
- addToList() : void
- Adds a value to a Comma-separated list stored in $key of user settings
- clear() : void
- Resets the user settings to the default
- get() : mixed
- Returns a specific user setting
- getAll() : mixed
- Get all user settings
- removeFromList() : void
- Removes a value from a Comma-separated list stored in $key of user settings
- set() : void
- Sets user settings by key/value pair
- unsetOption() : void
- Unsets a key in user settings
- getFromDottedNotation() : mixed
- Computes the subarray from dotted notation
- setFromDottedNotation() : void
- Sets the value of a key written in dotted notation
Properties
$backendUser
protected
BackendUserAuthentication
$backendUser
Methods
__construct()
public
__construct([BackendUserAuthentication|null $backendUser = null ]) : mixed
Parameters
- $backendUser : BackendUserAuthentication|null = null
addToList()
Adds a value to a Comma-separated list stored in $key of user settings
public
addToList(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
clear()
Resets the user settings to the default
public
clear() : void
get()
Returns a specific user setting
public
get(string $key) : mixed
Parameters
- $key : string
-
Identifier, allows also dotted notation for subarrays
Return values
mixed —Value associated
getAll()
Get all user settings
public
getAll() : mixed
Return values
mixed —all values, usually a multi-dimensional array
removeFromList()
Removes a value from a Comma-separated list stored in $key of user settings
public
removeFromList(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
set()
Sets user settings by key/value pair
public
set(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
unsetOption()
Unsets a key in user settings
public
unsetOption(string $key) : void
Parameters
- $key : string
getFromDottedNotation()
Computes the subarray from dotted notation
protected
getFromDottedNotation(string $key) : mixed
Parameters
- $key : string
-
Dotted notation of subkeys like moduleData.module1.general.checked
Return values
mixed —value of the settings
setFromDottedNotation()
Sets the value of a key written in dotted notation
protected
setFromDottedNotation(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed