‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Configuration\BackendUserConfiguration Class Reference

Public Member Functions

 __construct (BackendUserAuthentication $backendUser=null)
 
mixed get (string $key)
 
mixed getAll ()
 
 set (string $key, $value)
 
 addToList (string $key, $value)
 
 removeFromList (string $key, $value)
 
 clear ()
 
 unsetOption (string $key)
 

Protected Member Functions

mixed getFromDottedNotation (string $key)
 
 setFromDottedNotation (string $key, $value)
 

Protected Attributes

BackendUserAuthentication $backendUser
 

Detailed Description

Convenience wrapper for backend user configuration

Definition at line 29 of file BackendUserConfiguration.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Configuration\BackendUserConfiguration::__construct ( BackendUserAuthentication  $backendUser = null)
Parameters
BackendUserAuthentication | null$backendUser

Definition at line 38 of file BackendUserConfiguration.php.

References TYPO3\CMS\Backend\Configuration\BackendUserConfiguration\$backendUser, and $GLOBALS.

Member Function Documentation

◆ addToList()

TYPO3\CMS\Backend\Configuration\BackendUserConfiguration::addToList ( string  $key,
  $value 
)

Adds a value to a Comma-separated list stored in $key of user settings

Parameters
mixed$value

Definition at line 86 of file BackendUserConfiguration.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\inList().

◆ clear()

TYPO3\CMS\Backend\Configuration\BackendUserConfiguration::clear ( )

Resets the user settings to the default

Definition at line 119 of file BackendUserConfiguration.php.

◆ get()

mixed TYPO3\CMS\Backend\Configuration\BackendUserConfiguration::get ( string  $key)

Returns a specific user setting

Parameters
string$key‪Identifier, allows also dotted notation for subarrays
Returns
‪mixed Value associated

Definition at line 49 of file BackendUserConfiguration.php.

References TYPO3\CMS\Backend\Configuration\BackendUserConfiguration\getFromDottedNotation().

◆ getAll()

mixed TYPO3\CMS\Backend\Configuration\BackendUserConfiguration::getAll ( )

Get all user settings

Returns
‪mixed all values, usually a multi-dimensional array

Definition at line 59 of file BackendUserConfiguration.php.

◆ getFromDottedNotation()

mixed TYPO3\CMS\Backend\Configuration\BackendUserConfiguration::getFromDottedNotation ( string  $key)
protected

Computes the subarray from dotted notation

Parameters
string$key‪Dotted notation of subkeys like moduleData.module1.general.checked
Returns
‪mixed value of the settings

Definition at line 141 of file BackendUserConfiguration.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Configuration\BackendUserConfiguration\get().

◆ removeFromList()

TYPO3\CMS\Backend\Configuration\BackendUserConfiguration::removeFromList ( string  $key,
  $value 
)

Removes a value from a Comma-separated list stored in $key of user settings

Parameters
mixed$value

Definition at line 105 of file BackendUserConfiguration.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\inList(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ set()

TYPO3\CMS\Backend\Configuration\BackendUserConfiguration::set ( string  $key,
  $value 
)

Sets user settings by key/value pair

Parameters
mixed$value

Definition at line 69 of file BackendUserConfiguration.php.

References TYPO3\CMS\Backend\Configuration\BackendUserConfiguration\setFromDottedNotation().

◆ setFromDottedNotation()

TYPO3\CMS\Backend\Configuration\BackendUserConfiguration::setFromDottedNotation ( string  $key,
  $value 
)
protected

Sets the value of a key written in dotted notation

Parameters
mixed$value

Definition at line 163 of file BackendUserConfiguration.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Configuration\BackendUserConfiguration\set().

◆ unsetOption()

TYPO3\CMS\Backend\Configuration\BackendUserConfiguration::unsetOption ( string  $key)

Unsets a key in user settings

Definition at line 127 of file BackendUserConfiguration.php.

Member Data Documentation

◆ $backendUser

BackendUserAuthentication TYPO3\CMS\Backend\Configuration\BackendUserConfiguration::$backendUser
protected