AbstractConfigurationManager implements SingletonInterface
Abstract base class for a general purpose configuration manager
only to be used within Extbase, not part of TYPO3 Core API.
Table of Contents
Interfaces
- SingletonInterface
- "empty" interface for singletons (marker interface pattern)
Constants
- DEFAULT_BACKEND_STORAGE_PID = 0
- Default backend storage PID
Properties
- $configuration : array<string|int, mixed>
- Storage of the raw TypoScript configuration
- $configurationCache : array<string|int, mixed>
- 1st level configuration cache
- $contentObject : ContentObjectRenderer
- $extensionName : string
- name of the extension this Configuration Manager instance belongs to
- $pluginName : string
- name of the plugin this Configuration Manager instance belongs to
- $typoScriptService : TypoScriptService
Methods
- __construct() : mixed
- getConfiguration() : array<string|int, mixed>
- Loads the Extbase Framework configuration.
- getContentObject() : ContentObjectRenderer
- getDefaultBackendStoragePid() : int
- Returns the default backend storage pid
- getTypoScriptSetup() : array<string|int, mixed>
- Returns TypoScript Setup array from current Environment.
- setConfiguration() : void
- Sets the specified raw configuration coming from the outside.
- setContentObject() : void
- getContextSpecificFrameworkConfiguration() : array<string|int, mixed>
- The context specific configuration returned by this method will override the framework configuration which was obtained from TypoScript. This can be used f.e. to override the storagePid with the value set inside the Plugin Instance.
- getControllerConfiguration() : array<string|int, mixed>
- Returns the configured controller/action configuration of the specified plugin/module in the format array( 'Controller1' => array('action1', 'action2'), 'Controller2' => array('action3', 'action4') )
- getExtbaseConfiguration() : array<string|int, mixed>
- Returns the TypoScript configuration found in config.tx_extbase
- getPluginConfiguration() : array<string|int, mixed>
- Returns the TypoScript configuration found in plugin.tx_yourextension_yourplugin / module.tx_yourextension_yourmodule merged with the global configuration of your extension from plugin.tx_yourextension / module.tx_yourextension
- getRecursiveStoragePids() : array<string|int, mixed>|array<string|int, int>
- The implementation of the methods to return a list of storagePid that are below a certain storage pid.
- overrideControllerConfigurationWithSwitchableControllerActions() : void
- This method possibly overrides the controller configuration with an alternative configuration passed along via $frameworkConfiguration.
Constants
DEFAULT_BACKEND_STORAGE_PID
Default backend storage PID
public
mixed
DEFAULT_BACKEND_STORAGE_PID
= 0
Properties
$configuration
Storage of the raw TypoScript configuration
protected
array<string|int, mixed>
$configuration
= []
$configurationCache
1st level configuration cache
protected
array<string|int, mixed>
$configurationCache
= []
$contentObject
protected
ContentObjectRenderer
$contentObject
$extensionName
name of the extension this Configuration Manager instance belongs to
protected
string
$extensionName
$pluginName
name of the plugin this Configuration Manager instance belongs to
protected
string
$pluginName
$typoScriptService
protected
TypoScriptService
$typoScriptService
Methods
__construct()
public
__construct(TypoScriptService $typoScriptService) : mixed
Parameters
- $typoScriptService : TypoScriptService
getConfiguration()
Loads the Extbase Framework configuration.
public
getConfiguration([string|null $extensionName = null ][, string|null $pluginName = null ]) : array<string|int, mixed>
The Extbase framework configuration HAS TO be retrieved using this method, as they are come from different places than the normal settings. Framework configuration is, in contrast to normal settings, needed for the Extbase framework to operate correctly.
Parameters
- $extensionName : string|null = null
-
if specified, the configuration for the given extension will be returned (plugin.tx_extensionname)
- $pluginName : string|null = null
-
if specified, the configuration for the given plugin will be returned (plugin.tx_extensionname_pluginname)
Return values
array<string|int, mixed> —the Extbase framework configuration
getContentObject()
public
getContentObject() : ContentObjectRenderer
Tags
Return values
ContentObjectRenderergetDefaultBackendStoragePid()
Returns the default backend storage pid
public
getDefaultBackendStoragePid() : int
Return values
intgetTypoScriptSetup()
Returns TypoScript Setup array from current Environment.
public
abstract getTypoScriptSetup() : array<string|int, mixed>
Return values
array<string|int, mixed> —the TypoScript setup
setConfiguration()
Sets the specified raw configuration coming from the outside.
public
setConfiguration([array<string|int, mixed> $configuration = [] ]) : void
Note that this is a low level method and only makes sense to be used by Extbase internally.
Parameters
- $configuration : array<string|int, mixed> = []
-
The new configuration
setContentObject()
public
setContentObject(ContentObjectRenderer $contentObject) : void
Parameters
- $contentObject : ContentObjectRenderer
Tags
getContextSpecificFrameworkConfiguration()
The context specific configuration returned by this method will override the framework configuration which was obtained from TypoScript. This can be used f.e. to override the storagePid with the value set inside the Plugin Instance.
protected
abstract getContextSpecificFrameworkConfiguration(array<string|int, mixed> $frameworkConfiguration) : array<string|int, mixed>
WARNING: Make sure this method ALWAYS returns an array!
Parameters
- $frameworkConfiguration : array<string|int, mixed>
-
The framework configuration until now
Return values
array<string|int, mixed> —context specific configuration which will override the configuration obtained by TypoScript
getControllerConfiguration()
Returns the configured controller/action configuration of the specified plugin/module in the format array( 'Controller1' => array('action1', 'action2'), 'Controller2' => array('action3', 'action4') )
protected
abstract getControllerConfiguration(string $extensionName, string $pluginName) : array<string|int, mixed>
Parameters
- $extensionName : string
- $pluginName : string
-
in FE mode this is the specified plugin name, in BE mode this is the full module signature
Return values
array<string|int, mixed>getExtbaseConfiguration()
Returns the TypoScript configuration found in config.tx_extbase
protected
getExtbaseConfiguration() : array<string|int, mixed>
Return values
array<string|int, mixed>getPluginConfiguration()
Returns the TypoScript configuration found in plugin.tx_yourextension_yourplugin / module.tx_yourextension_yourmodule merged with the global configuration of your extension from plugin.tx_yourextension / module.tx_yourextension
protected
abstract getPluginConfiguration(string $extensionName[, string $pluginName = null ]) : array<string|int, mixed>
Parameters
- $extensionName : string
- $pluginName : string = null
-
in FE mode this is the specified plugin name, in BE mode this is the full module signature
Return values
array<string|int, mixed>getRecursiveStoragePids()
The implementation of the methods to return a list of storagePid that are below a certain storage pid.
protected
abstract getRecursiveStoragePids(array<string|int, mixed>|array<string|int, int> $storagePids[, int $recursionDepth = 0 ]) : array<string|int, mixed>|array<string|int, int>
Parameters
- $storagePids : array<string|int, mixed>|array<string|int, int>
-
Storage PIDs to start at; multiple PIDs possible as comma-separated list
- $recursionDepth : int = 0
-
Maximum number of levels to search, 0 to disable recursive lookup
Return values
array<string|int, mixed>|array<string|int, int> —storage PIDs
overrideControllerConfigurationWithSwitchableControllerActions()
This method possibly overrides the controller configuration with an alternative configuration passed along via $frameworkConfiguration.
protected
overrideControllerConfigurationWithSwitchableControllerActions(array<string|int, mixed> &$frameworkConfiguration, array<string|int, mixed> $switchableControllerActions) : void
since TYPO3 v10, will be removed in one of the next major versions of TYPO3, probably version 11.0 or 12.0.
If called by \TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::getConfiguration, $switchableControllerActions may contain an alternative controller configuration defined via typoscript:
Example: tt_content.list.20.indexedsearch_pi2.switchableControllerActions { Search { 0 = search } }
If called by \TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::overrideSwitchableControllerActionsFromFlexForm, $switchableControllerActions may contain an alternative controller configuration defined via plugin flexform.
Parameters
- $frameworkConfiguration : array<string|int, mixed>
- $switchableControllerActions : array<string|int, mixed>