FrontendConfigurationManager extends AbstractConfigurationManager

A general purpose configuration manager used in frontend mode.

Should NOT be singleton, as a new configuration manager is needed per plugin.

Internal

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

Table of Contents

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
$flexFormService  : FlexFormService
$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>
Get context specific framework configuration.
getControllerConfiguration()  : array<string|int, mixed>
Returns the configured controller/action configuration of the specified plugin 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 merged with the global configuration of your extension from plugin.tx_yourextension
getRecursiveStoragePids()  : array<string|int, mixed>|array<string|int, int>
Returns a comma separated list of storagePid that are below a certain storage pid.
mergeConfigurationIntoFrameworkConfiguration()  : array<string|int, mixed>
Merge a configuration into the framework configuration.
overrideConfigurationFromFlexForm()  : array<string|int, mixed>
Overrides configuration settings from flexForms.
overrideConfigurationFromPlugin()  : array<string|int, mixed>
Overrides configuration settings from the plugin typoscript (plugin.tx_myext_pi1.)
overrideControllerConfigurationWithSwitchableControllerActions()  : void
This method possibly overrides the controller configuration with an alternative configuration passed along via $frameworkConfiguration.
overrideControllerConfigurationWithSwitchableControllerActionsFromFlexForm()  : array<string|int, mixed>
Overrides the controller configuration with possibly registered switchable controller actions of the flex form configuration.
overrideStoragePidIfStartingPointIsSet()  : array<string|int, mixed>
Overrides the storage PID settings, in case the "Startingpoint" settings is set in the plugin configuration.

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 = []

$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

Methods

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
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.

Return values
ContentObjectRenderer

getDefaultBackendStoragePid()

Returns the default backend storage pid

public getDefaultBackendStoragePid() : int
Return values
int

getTypoScriptSetup()

Returns TypoScript Setup array from current Environment.

public getTypoScriptSetup() : array<string|int, mixed>
Return values
array<string|int, mixed>

the raw 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

getContextSpecificFrameworkConfiguration()

Get context specific framework configuration.

protected getContextSpecificFrameworkConfiguration(array<string|int, mixed> $frameworkConfiguration) : array<string|int, mixed>
  • Overrides storage PID with setting "Startingpoint"
  • merge flexForm configuration, if needed
Parameters
$frameworkConfiguration : array<string|int, mixed>

The framework configuration to modify

Return values
array<string|int, mixed>

the modified framework configuration

getControllerConfiguration()

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

protected getControllerConfiguration(string $extensionName, string $pluginName) : array<string|int, mixed>
Parameters
$extensionName : string
$pluginName : string
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 merged with the global configuration of your extension from plugin.tx_yourextension

protected getPluginConfiguration(string $extensionName[, string $pluginName = null ]) : array<string|int, mixed>
Parameters
$extensionName : string
$pluginName : string = null
Return values
array<string|int, mixed>

getRecursiveStoragePids()

Returns a comma separated list of storagePid that are below a certain storage pid.

protected 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

mergeConfigurationIntoFrameworkConfiguration()

Merge a configuration into the framework configuration.

protected mergeConfigurationIntoFrameworkConfiguration(array<string|int, mixed> $frameworkConfiguration, array<string|int, mixed> $configuration, string $configurationPartName) : array<string|int, mixed>
Parameters
$frameworkConfiguration : array<string|int, mixed>

the framework configuration to merge the data on

$configuration : array<string|int, mixed>

The configuration

$configurationPartName : string

The name of the configuration part which should be merged.

Return values
array<string|int, mixed>

the processed framework configuration

overrideConfigurationFromFlexForm()

Overrides configuration settings from flexForms.

protected overrideConfigurationFromFlexForm(array<string|int, mixed> $frameworkConfiguration) : array<string|int, mixed>

This merges the whole flexForm data, and overrides the controller configuration with possibly configured switchable controller actions.

Parameters
$frameworkConfiguration : array<string|int, mixed>

the framework configuration

Return values
array<string|int, mixed>

the framework configuration with overridden data from flexForm

overrideConfigurationFromPlugin()

Overrides configuration settings from the plugin typoscript (plugin.tx_myext_pi1.)

protected overrideConfigurationFromPlugin(array<string|int, mixed> $frameworkConfiguration) : array<string|int, mixed>
Parameters
$frameworkConfiguration : array<string|int, mixed>

the framework configuration

Return values
array<string|int, mixed>

the framework configuration with overridden data from typoscript

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
Deprecated

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>

overrideControllerConfigurationWithSwitchableControllerActionsFromFlexForm()

Overrides the controller configuration with possibly registered switchable controller actions of the flex form configuration.

protected overrideControllerConfigurationWithSwitchableControllerActionsFromFlexForm(array<string|int, mixed> $frameworkConfiguration, array<string|int, mixed> $flexFormConfiguration) : array<string|int, mixed>
Deprecated

since TYPO3 v10, will be removed in one of the next major versions of TYPO3, probably version 11.0 or 12.0.

Parameters
$frameworkConfiguration : array<string|int, mixed>

The original framework configuration

$flexFormConfiguration : array<string|int, mixed>

The full flexForm configuration

Tags
throws
ParseErrorException
Return values
array<string|int, mixed>

the modified framework configuration, if needed

overrideStoragePidIfStartingPointIsSet()

Overrides the storage PID settings, in case the "Startingpoint" settings is set in the plugin configuration.

protected overrideStoragePidIfStartingPointIsSet(array<string|int, mixed> $frameworkConfiguration) : array<string|int, mixed>
Parameters
$frameworkConfiguration : array<string|int, mixed>

the framework configurations

Return values
array<string|int, mixed>

the framework configuration with overridden storagePid


        
On this page

Search results