2 namespace TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu;
24 trait MenuViewHelperTrait
42 protected function getPageConstraints($includeNotInMenu =
false, $includeMenuSeparator =
false)
44 $constraints = array();
48 if (!$includeNotInMenu) {
49 $constraints[] =
'nav_hide = 0';
52 if (!$includeMenuSeparator) {
56 return 'AND ' . implode(
' AND ', $constraints);
67 protected function getPageUids(array $pageUids, $entryLevel = 0)
69 $typoScriptFrontendController = $this->getTypoScriptFrontendController();
72 $pageUids = array_filter($pageUids);
75 if (empty($pageUids)) {
76 if ($entryLevel !== null) {
77 if ($entryLevel < 0) {
78 $entryLevel = count($typoScriptFrontendController->tmpl->rootLine) - 1 + $entryLevel;
80 $pageUids = array($typoScriptFrontendController->tmpl->rootLine[$entryLevel][
'uid']);
82 $pageUids = array($typoScriptFrontendController->id);
93 protected function renderChildrenWithVariables(array $variables)
95 foreach ($variables as $name => $value) {
96 $this->templateVariableContainer->add($name, $value);
99 $output = $this->renderChildren();
101 foreach ($variables as $name => $_) {
102 $this->templateVariableContainer->remove($name);
111 protected function getTypoScriptFrontendController()