当前位置: 首页>>代码示例>>PHP>>正文


PHP PageRepository::getMountPointInfo方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Frontend\Page\PageRepository::getMountPointInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP PageRepository::getMountPointInfo方法的具体用法?PHP PageRepository::getMountPointInfo怎么用?PHP PageRepository::getMountPointInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Frontend\Page\PageRepository的用法示例。


在下文中一共展示了PageRepository::getMountPointInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: isSubMenu

 /**
  * Returns TRUE if there is a submenu with items for the page id, $uid
  * Used by the item states "IFSUB", "ACTIFSUB" and "CURIFSUB" to check if there is a submenu
  *
  * @param integer $uid Page uid for which to search for a submenu
  * @return boolean Returns TRUE if there was a submenu with items found
  * @access private
  * @todo Define visibility
  */
 public function isSubMenu($uid)
 {
     // Looking for a mount-pid for this UID since if that
     // exists we should look for a subpages THERE and not in the input $uid;
     $mount_info = $this->sys_page->getMountPointInfo($uid);
     if (is_array($mount_info)) {
         $uid = $mount_info['mount_pid'];
     }
     $recs = $this->sys_page->getMenu($uid, 'uid,pid,doktype,mount_pid,mount_pid_ol,nav_hide,shortcut,shortcut_mode,l18n_cfg');
     $hasSubPages = FALSE;
     $bannedUids = $this->getBannedUids();
     foreach ($recs as $theRec) {
         // no valid subpage if the document type is excluded from the menu
         if (GeneralUtility::inList($this->doktypeExcludeList, $theRec['doktype'])) {
             continue;
         }
         // No valid subpage if the page is hidden inside menus and
         // it wasn't forced to show such entries
         if ($theRec['nav_hide'] && !$this->conf['includeNotInMenu']) {
             continue;
         }
         // No valid subpage 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($theRec['l18n_cfg'])) {
             continue;
         }
         // No valid subpage if the alternative language should be shown and the page settings
         // are requiring a valid overlay but it doesn't exists
         $hideIfNotTranslated = GeneralUtility::hideIfNotTranslated($theRec['l18n_cfg']);
         if ($GLOBALS['TSFE']->sys_language_uid && $hideIfNotTranslated && !$theRec['_PAGES_OVERLAY']) {
             continue;
         }
         // No valid subpage if the subpage is banned by excludeUidList
         if (in_array($theRec['uid'], $bannedUids)) {
             continue;
         }
         $hasSubPages = TRUE;
         break;
     }
     return $hasSubPages;
 }
开发者ID:rob-ot-dot-be,项目名称:ggallkeysecurity,代码行数:50,代码来源:AbstractMenuContentObject.php


注:本文中的TYPO3\CMS\Frontend\Page\PageRepository::getMountPointInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。