TYPO3 CMS  TYPO3_6-2
HierarchicalMenuContentObject.php
Go to the documentation of this file.
1 <?php
3 
23 
30  public function render($conf = array()) {
31  if (!empty($conf['if.']) && !$this->cObj->checkIf($conf['if.'])) {
32  return '';
33  }
34 
35  $theValue = '';
36  $menuType = $conf[1];
37  try {
39  $menuObjectFactory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\Menu\\MenuContentObjectFactory');
40  $menu = $menuObjectFactory->getMenuObjectByType($menuType);
41  $GLOBALS['TSFE']->register['count_HMENU']++;
42  $GLOBALS['TSFE']->register['count_HMENU_MENUOBJ'] = 0;
43  $GLOBALS['TSFE']->register['count_MENUOBJ'] = 0;
44  $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid'] = array();
45  $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId'] = array();
46  $menu->parent_cObj = $this->cObj;
47  $menu->start($GLOBALS['TSFE']->tmpl, $GLOBALS['TSFE']->sys_page, '', $conf, 1);
48  $menu->makeMenu();
49  $theValue .= $menu->writeMenu();
50  } catch (\TYPO3\CMS\Frontend\ContentObject\Menu\Exception\NoSuchMenuTypeException $e) {
51  }
52  $wrap = isset($conf['wrap.']) ? $this->cObj->stdWrap($conf['wrap'], $conf['wrap.']) : $conf['wrap'];
53  if ($wrap) {
54  $theValue = $this->cObj->wrap($theValue, $wrap);
55  }
56  if (isset($conf['stdWrap.'])) {
57  $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
58  }
59  return $theValue;
60  }
61 
62 }
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]