2 namespace TYPO3\CMS\Extbase\Configuration;
113 if ($this->contentObject !== null) {
129 $this->configurationCache = array();
132 $this->configuration = $this->typoScriptService->convertTypoScriptArrayToPlainArray(
$configuration);
148 $configurationCacheKey = strtolower((
$extensionName ?: $this->extensionName) .
'_' . (
$pluginName ?: $this->pluginName));
149 if (isset($this->configurationCache[$configurationCacheKey])) {
150 return $this->configurationCache[$configurationCacheKey];
153 if (!isset($frameworkConfiguration[
'persistence'][
'storagePid'])) {
159 \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($pluginConfiguration, $this->configuration);
161 if (isset($this->configuration[
'switchableControllerActions'])) {
168 \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($frameworkConfiguration, $pluginConfiguration);
174 if (!empty($frameworkConfiguration[
'persistence'][
'storagePid'])) {
175 if (is_array($frameworkConfiguration[
'persistence'][
'storagePid'])) {
181 if (!$this->environmentService->isEnvironmentInFrontendMode()) {
182 \TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility::simulateFrontendEnvironment($this->
getContentObject());
184 $conf = $this->typoScriptService->convertPlainArrayToTypoScriptArray($frameworkConfiguration[
'persistence']);
185 $frameworkConfiguration[
'persistence'][
'storagePid'] =
$GLOBALS[
'TSFE']->cObj->stdWrap($conf[
'storagePid'], $conf[
'storagePid.']);
186 if (!$this->environmentService->isEnvironmentInFrontendMode()) {
187 \TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility::resetFrontendEnvironment();
191 if (!empty($frameworkConfiguration[
'persistence'][
'recursive'])) {
194 $storagePids = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(
',', $frameworkConfiguration[
'persistence'][
'storagePid']);
195 array_walk($storagePids,
function (&$storagePid) {
196 if ($storagePid > 0) {
197 $storagePid = -$storagePid;
201 implode(
',', $storagePids),
202 (
int)$frameworkConfiguration[
'persistence'][
'recursive']
207 $this->configurationCache[$configurationCacheKey] = $frameworkConfiguration;
208 return $frameworkConfiguration;
219 $extbaseConfiguration = array();
220 if (isset($setup[
'config.'][
'tx_extbase.'])) {
221 $extbaseConfiguration = $this->typoScriptService->convertTypoScriptArrayToPlainArray($setup[
'config.'][
'tx_extbase.']);
223 return $extbaseConfiguration;
233 return self::DEFAULT_BACKEND_STORAGE_PID;
243 $overriddenSwitchableControllerActions = array();
244 foreach ($switchableControllerActions as $controllerName => $actions) {
245 if (!isset($frameworkConfiguration[
'controllerConfiguration'][$controllerName])) {
248 $overriddenSwitchableControllerActions[$controllerName] = array(
'actions' => $actions);
249 $nonCacheableActions = $frameworkConfiguration[
'controllerConfiguration'][$controllerName][
'nonCacheableActions'];
250 if (!is_array($nonCacheableActions)) {
255 $overriddenNonCacheableActions = array_intersect($nonCacheableActions, $actions);
256 if (!empty($overriddenNonCacheableActions)) {
257 $overriddenSwitchableControllerActions[$controllerName][
'nonCacheableActions'] = $overriddenNonCacheableActions;
260 $frameworkConfiguration[
'controllerConfiguration'] = $overriddenSwitchableControllerActions;