‪TYPO3CMS  11.5
TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager:
TYPO3\CMS\Core\SingletonInterface TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager

Public Member Functions

 __construct (TypoScriptService $typoScriptService)
 
 setContentObject (ContentObjectRenderer $contentObject)
 
ContentObjectRenderer getContentObject ()
 
 setConfiguration (array $configuration=[])
 
array getConfiguration (?string $extensionName=null, ?string $pluginName=null)
 
int getDefaultBackendStoragePid ()
 
array getTypoScriptSetup ()
 

Public Attributes

const DEFAULT_BACKEND_STORAGE_PID = 0
 

Protected Member Functions

array getExtbaseConfiguration ()
 
 overrideControllerConfigurationWithSwitchableControllerActions (array &$frameworkConfiguration, array $switchableControllerActions)
 
array getContextSpecificFrameworkConfiguration (array $frameworkConfiguration)
 
array getPluginConfiguration (string $extensionName, ?string $pluginName=null)
 
array getControllerConfiguration (string $extensionName, string $pluginName)
 
array int[] getRecursiveStoragePids (array $storagePids, int $recursionDepth=0)
 

Protected Attributes

array $configuration = array( )
 
ContentObjectRenderer $contentObject
 
TypoScriptService $typoScriptService
 
string $extensionName
 
string $pluginName
 
array $configurationCache = array( )
 

Detailed Description

Abstract base class for a general purpose configuration manager

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 33 of file AbstractConfigurationManager.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::__construct ( TypoScriptService  $typoScriptService)

Member Function Documentation

◆ getConfiguration()

array TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::getConfiguration ( ?string  $extensionName = null,
?string  $pluginName = null 
)

Loads the Extbase Framework configuration.

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
string | null$extensionName‪if specified, the configuration for the given extension will be returned (plugin.tx_extensionname)
string | null$pluginName‪if specified, the configuration for the given plugin will be returned (plugin.tx_extensionname_pluginname)
Returns
‪array the Extbase framework configuration

Definition at line 127 of file AbstractConfigurationManager.php.

References TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\$extensionName, $GLOBALS, TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\$pluginName, TYPO3\CMS\Core\Http\ApplicationType\fromRequest(), TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getContextSpecificFrameworkConfiguration(), TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getControllerConfiguration(), TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getDefaultBackendStoragePid(), TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getExtbaseConfiguration(), TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getPluginConfiguration(), TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getRecursiveStoragePids(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule(), TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\overrideControllerConfigurationWithSwitchableControllerActions(), TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility\resetFrontendEnvironment(), and TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility\simulateFrontendEnvironment().

Referenced by TYPO3\CMS\Extbase\Tests\UnitDeprecated\Configuration\AbstractConfigurationManagerTest\switchableControllerActionsAreNotOverriddenIfPluginNameIsSpecified(), TYPO3\CMS\Extbase\Tests\UnitDeprecated\Configuration\AbstractConfigurationManagerTest\switchableControllerActionsAreOverriddenIfPluginNameIsNotSpecified(), and TYPO3\CMS\Extbase\Tests\UnitDeprecated\Configuration\AbstractConfigurationManagerTest\switchableControllerActionsAreOverriddenIfSpecifiedPluginIsTheCurrentPlugin().

◆ getContentObject()

ContentObjectRenderer TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::getContentObject ( )
Returns
‪ContentObjectRenderer
Todo:
‪: This dependency to ContentObjectRenderer on a singleton object is unfortunate: The current instance is set through USER cObj and extbase Bootstrap, its null in Backend. This getter is misused to retrieve current ContentObjectRenderer state by some extensions (eg. ext:form). This dependency should be removed altogether. Although the current implementation always returns an instance of ContentObjectRenderer, we do not want to hard-expect consuming classes on that, since this methods needs to be dropped anyways, so potential null return is kept.

Definition at line 93 of file AbstractConfigurationManager.php.

References TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\$contentObject.

Referenced by TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager\getRecursiveStoragePids().

◆ getContextSpecificFrameworkConfiguration()

array TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::getContextSpecificFrameworkConfiguration ( array  $frameworkConfiguration)
abstractprotected

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.

WARNING: Make sure this method ALWAYS returns an array!

Parameters
array$frameworkConfiguration‪The framework configuration until now
Returns
‪array context specific configuration which will override the configuration obtained by TypoScript

Reimplemented in TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager, and TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager.

Referenced by TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getConfiguration().

◆ getControllerConfiguration()

array TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::getControllerConfiguration ( string  $extensionName,
string  $pluginName 
)
abstractprotected

Returns the configured controller/action configuration of the specified plugin/module in the format array( 'Controller1' => array('action1', 'action2'), 'Controller2' => array('action3', 'action4') )

Parameters
string$extensionName
string$pluginName‪in FE mode this is the specified plugin name, in BE mode this is the full module signature
Returns
‪array

Reimplemented in TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager, and TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager.

Referenced by TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getConfiguration().

◆ getDefaultBackendStoragePid()

int TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::getDefaultBackendStoragePid ( )

◆ getExtbaseConfiguration()

array TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::getExtbaseConfiguration ( )
protected

Returns the TypoScript configuration found in config.tx_extbase

Returns
‪array

Definition at line 202 of file AbstractConfigurationManager.php.

References TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getTypoScriptSetup().

Referenced by TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getConfiguration().

◆ getPluginConfiguration()

array TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::getPluginConfiguration ( string  $extensionName,
?string  $pluginName = null 
)
abstractprotected

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

Parameters
string$extensionName
string$pluginName‪in FE mode this is the specified plugin name, in BE mode this is the full module signature
Returns
‪array

Reimplemented in TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager, and TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager.

Referenced by TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getConfiguration().

◆ getRecursiveStoragePids()

array int [] TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::getRecursiveStoragePids ( array  $storagePids,
int  $recursionDepth = 0 
)
abstractprotected

The implementation of the methods to return a list of storagePid that are below a certain storage pid.

Parameters
array | int[]$storagePids‪Storage PIDs to start at; multiple PIDs possible as comma-separated list
int$recursionDepth‪Maximum number of levels to search, 0 to disable recursive lookup
Returns
‪array|int[] storage PIDs

Reimplemented in TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager, and TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager.

Referenced by TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getConfiguration().

◆ getTypoScriptSetup()

array TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::getTypoScriptSetup ( )
abstract

◆ overrideControllerConfigurationWithSwitchableControllerActions()

TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::overrideControllerConfigurationWithSwitchableControllerActions ( array &  $frameworkConfiguration,
array  $switchableControllerActions 
)
protected

This method possibly overrides the controller configuration with an alternative configuration passed along via $frameworkConfiguration.

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
array$frameworkConfiguration
array$switchableControllerActions
Deprecated:
‪since TYPO3 v10, will be removed in one of the next major versions of TYPO3, probably version 11.0 or 12.0.

Definition at line 243 of file AbstractConfigurationManager.php.

Referenced by TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getConfiguration(), and TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager\overrideControllerConfigurationWithSwitchableControllerActionsFromFlexForm().

◆ setConfiguration()

◆ setContentObject()

TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::setContentObject ( ContentObjectRenderer  $contentObject)
Parameters
ContentObjectRenderer$contentObject
Todo:
‪: See note on getContentObject() below.

Definition at line 79 of file AbstractConfigurationManager.php.

References TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\$contentObject.

Member Data Documentation

◆ $configuration

array TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::$configuration = array( )
protected

◆ $configurationCache

array TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::$configurationCache = array( )
protected

1st level configuration cache

Definition at line 68 of file AbstractConfigurationManager.php.

◆ $contentObject

ContentObjectRenderer TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::$contentObject
protected

◆ $extensionName

◆ $pluginName

◆ $typoScriptService

TypoScriptService TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager::$typoScriptService
protected

◆ DEFAULT_BACKEND_STORAGE_PID