[FEATURE] Conditions support in backend layouts 97/23697/2
authorAlexey Gafiulov <gafiulov@i-tribe.de>
Thu, 5 Sep 2013 15:58:11 +0000 (21:58 +0600)
committerPhilipp Gampe <philipp.gampe@typo3.org>
Sat, 14 Sep 2013 09:40:01 +0000 (11:40 +0200)
Resolves: #47588
Releases: 6.2
Change-Id: I266f28472ffd78443b107d7ad6577603aecbc584
Reviewed-on: https://review.typo3.org/23697
Reviewed-by: Jo Hasenau
Reviewed-by: Mattias Nilsson
Tested-by: Mattias Nilsson
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
typo3/sysext/backend/Classes/View/BackendLayoutView.php
typo3/sysext/backend/Classes/View/PageLayoutView.php

index 711195c..2064d24 100644 (file)
@@ -135,7 +135,9 @@ class BackendLayoutView {
                if ($backendLayout) {
                        /** @var $parser \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser */
                        $parser = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser');
-                       $parser->parse($parser->checkIncludeLines($backendLayout['config']));
+                       /** @var \TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher $conditionMatcher */
+                       $conditionMatcher = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Configuration\\TypoScript\\ConditionMatching\\ConditionMatcher');
+                       $parser->parse($parser->checkIncludeLines($backendLayout['config']), $conditionMatcher);
                        $backendLayout['__config'] = $parser->setup;
                        $backendLayout['__items'] = array();
                        $backendLayout['__colPosList'] = array();
index 2ea7be7..ad1bec2 100644 (file)
@@ -529,8 +529,11 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                        $backendLayoutRecord = $this->getBackendLayoutConfiguration();
                                        // GRID VIEW:
                                        // Initialize TS parser to parse config to array
+                                       /** @var \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser $parser */
                                        $parser = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser');
-                                       $parser->parse($parser->checkIncludeLines($backendLayoutRecord['config']));
+                                       /** @var \TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher $conditionMatcher */
+                                       $conditionMatcher = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Configuration\\TypoScript\\ConditionMatching\\ConditionMatcher');
+                                       $parser->parse($parser->checkIncludeLines($backendLayoutRecord['config']), $conditionMatcher);
                                        $grid .= '<div class="t3-gridContainer"><table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" class="t3-page-columns t3-gridTable">';
                                        // Add colgroups
                                        $colCount = intval($parser->setup['backend_layout.']['colCount']);