/**
  * @return string
  */
 public function listAction($content, $conf)
 {
     $navigation = [];
     foreach ($conf['export.'] as $name => $item) {
         $navigation[rtrim($name, '.')] = Page::create($item['id'], null, boolval($item['noCheck']));
     }
     return json_encode($navigation);
 }
Beispiel #2
0
 /**
  * @param Page $page
  * @return bool
  */
 protected function filterMenuPage(Page $page)
 {
     $pageRow = $page->row;
     // No valid page if the page is hidden inside menus and
     // it wasn't forced to show such entries
     if ($pageRow['nav_hide']) {
         return false;
     }
     // No valid page if the default language should be shown and the page settings
     // are excluding the visibility of the default language
     if (!$GLOBALS['TSFE']->sys_language_uid && GeneralUtility::hideIfDefaultLanguage($pageRow['l18n_cfg'])) {
         return false;
     }
     // No valid page if the alternative language should be shown and the page settings
     // are requiring a valid overlay but it doesn't exists
     $hideIfNotTranslated = GeneralUtility::hideIfNotTranslated($pageRow['l18n_cfg']);
     if ($GLOBALS['TSFE']->sys_language_uid && $hideIfNotTranslated && !$pageRow['_PAGES_OVERLAY']) {
         return false;
     }
     if ($page->getType() === 'separator' && !$page->includeSeparators) {
         return false;
     }
     return true;
 }