[BUGFIX] Respect showAccessRestrictedPages in MenuProcessor
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / DataProcessing / MenuProcessor.php
index 693b64a..2e7534e 100644 (file)
@@ -94,6 +94,8 @@ class MenuProcessor implements DataProcessorInterface
         'begin.',
         'alternativeSortingField',
         'alternativeSortingField.',
+        'showAccessRestrictedPages',
+        'showAccessRestrictedPages.',
         'excludeUidList',
         'excludeUidList.',
         'excludeDoktypes',
@@ -356,6 +358,13 @@ class MenuProcessor implements DataProcessorInterface
             if ($i > 1) {
                 $this->menuConfig[$i . '.']['stdWrap.']['wrap'] = ',"children": [|]';
             }
+            if (array_key_exists('showAccessRestrictedPages', $this->menuConfig)) {
+                $this->menuConfig[$i . '.']['showAccessRestrictedPages'] = $this->menuConfig['showAccessRestrictedPages'];
+                if (array_key_exists('showAccessRestrictedPages.', $this->menuConfig)
+                    && is_array($this->menuConfig['showAccessRestrictedPages.'])) {
+                    $this->menuConfig[$i . '.']['showAccessRestrictedPages.'] = $this->menuConfig['showAccessRestrictedPages.'];
+                }
+            }
             $this->menuConfig[$i . '.']['expAll'] = $this->menuExpandAll;
             $this->menuConfig[$i . '.']['alternativeSortingField'] = $this->menuAlternativeSortingField;
             $this->menuConfig[$i . '.']['NO'] = '1';