‪TYPO3CMS  9.5
TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject:
TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject TYPO3\CMS\Frontend\ContentObject\Menu\ImageMenuContentObject TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject

Public Member Functions

bool start ($tmpl, $sys_page, $id, $conf, $menuNumber, $objSuffix='')
 
 makeMenu ()
 
 generate ()
 
string writeMenu ()
 
bool filterMenuPages (&$data, $banUidArray, $spacer)
 
TYPO3 CMS Frontend Page PageRepository getSysPage ()
 
TYPO3 CMS Frontend ContentObject ContentObjectRenderer getParentContentObject ()
 
 setParentMenu (array $menuArr=[], $menuItemKey)
 
array getParentMenuArr ()
 
array null getParentMenuItem ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait
bool __isset (string $propertyName)
 
mixed __get (string $propertyName)
 
 __set (string $propertyName, $propertyValue)
 
 __unset (string $propertyName)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait
mixed __call (string $methodName, array $arguments)
 

Public Attributes

TYPO3 CMS Frontend ContentObject ContentObjectRenderer $parent_cObj
 

Protected Member Functions

array removeInaccessiblePages (array $pages)
 
array prepareMenuItems ()
 
array prepareMenuItemsForUserSpecificMenu ($specialValue, $sortingField)
 
array prepareMenuItemsForLanguageMenu ($specialValue)
 
array prepareMenuItemsForDirectoryMenu ($specialValue, $sortingField)
 
array prepareMenuItemsForUpdatedMenu ($specialValue, $sortingField)
 
array prepareMenuItemsForKeywordsMenu ($specialValue, $sortingField)
 
array prepareMenuItemsForRootlineMenu ()
 
array prepareMenuItemsForBrowseMenu ($specialValue, $sortingField, $additionalWhere)
 
 analyzeCacheHashRequirements ($queryString)
 
array procesItemStates ($splitCount)
 
array link ($key, $altTarget='', $typeOverride='')
 
array determineOriginalShortcutPage (array $page)
 
 changeLinksForAccessRestrictedPages (&$LD, $page, $mainTarget, $typeOverride)
 
string subMenu ($uid, $objSuffix='')
 
bool isNext ($uid, $MPvar='')
 
bool isActive ($uid, $MPvar='')
 
bool isCurrent ($uid, $MPvar='')
 
bool isSubMenu ($uid)
 
bool isItemState ($kind, $key)
 
array accessKey ($title)
 
mixed userProcess ($mConfKey, $passVar)
 
 setATagParts ()
 
string getPageTitle ($title, $nav_title)
 
string getMPvar ($key)
 
string getDoktypeExcludeWhere ()
 
array getBannedUids ()
 
array menuTypoLink ($page, $oTarget, $no_cache, $script, $overrideArray='', $addParams='', $typeOverride='')
 
array sectionIndex ($altSortField, $pid=null)
 
TypoScriptFrontendController getTypoScriptFrontendController ()
 
 getCurrentLanguageAspect ()
 
TimeTracker getTimeTracker ()
 
TYPO3 CMS Core Cache Frontend FrontendInterface getCache ()
 
TYPO3 CMS Core Cache Frontend FrontendInterface getRuntimeCache ()
 
SiteInterface getCurrentSite ()
 
bool hasParentMenuArr ()
 
 hasParentMenuItemKey ()
 
 hasParentMenuItem ()
 

Protected Attributes

 $deprecatedPublicProperties
 
 $deprecatedPublicMethods
 
int $menuNumber = 1
 
int $entryLevel = 0
 
string $spacerIDList = '199'
 
string $doktypeExcludeList = '6'
 
int[] $alwaysActivePIDlist = array( )
 
string $imgNamePrefix = 'img'
 
int $imgNameNotRandom = 0
 
bool $debug = false
 
string $GMENU_fixKey = 'gmenu'
 
string[] $MP_array = array( )
 
array $conf = array( )
 
array $mconf = array( )
 
TYPO3 CMS Core TypoScript TemplateService $tmpl
 
TYPO3 CMS Frontend Page PageRepository $sys_page
 
int $id
 
string $nextActive
 
array[] $menuArr
 
string $hash
 
array $result = array( )
 
array $rL_uidRegister
 
string $INPfixMD5
 
mixed[] $I
 
string $WMresult
 
string $WMfreezePrefix
 
int $WMmenuItems
 
array[] $WMsubmenuObjSuffixes
 
string $WMextraScript
 
ContentObjectRenderer $WMcObj
 
string $alternativeMenuTempArray = ''
 
string $nameAttribute = 'name'
 
bool $useCacheHash = false
 
int null $parentMenuArrItemKey
 
array $parentMenuArr
 

Detailed Description

Generating navigation/menus from TypoScript

The HMENU content object uses this (or more precisely one of the extension classes). Among others the class generates an array of menu items. Thereafter functions from the subclasses are called. The class is always used through extension classes (like GraphicalMenuContentObject or TextMenuContentObject).

Definition at line 44 of file AbstractMenuContentObject.php.

Member Function Documentation

◆ accessKey()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::accessKey (   $title)
protected

Creates an access-key for a TMENU/GMENU menu item based on the menu item titles first letter

Parameters
string$titleMenu item title.
Returns
‪array Returns an array with keys "code" ("accesskey" attribute for the img-tag) and "alt" (text-addition to the "alt" attribute) if an access key was defined. Otherwise array was empty

Definition at line 2066 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\writeMenu(), and TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\writeMenu().

◆ analyzeCacheHashRequirements()

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::analyzeCacheHashRequirements (   $queryString)
protected

Analyzes the parameters to find if the link needs a cHash parameter.

Parameters
string$queryString

Definition at line 1291 of file AbstractMenuContentObject.php.

References $GLOBALS, and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getTypoScriptFrontendController().

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItemsForLanguageMenu().

◆ changeLinksForAccessRestrictedPages()

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::changeLinksForAccessRestrictedPages ( $LD,
  $page,
  $mainTarget,
  $typeOverride 
)
protected

Will change $LD (passed by reference) if the page is access restricted

Parameters
array$LD‪The array from the linkData() function
array$pagePage array
string$mainTarget‪Main target value
string$typeOverride‪Type number override if any

Definition at line 1826 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\link(), and TYPO3\CMS\Frontend\ContentObject\Menu\ImageMenuContentObject\makeImageMap().

◆ determineOriginalShortcutPage()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::determineOriginalShortcutPage ( array  $page)
protected

Determines original shortcut destination in page overlays.

Since the pages records used for menu rendering are overlaid by default, the original 'shortcut' value is lost, if a translation did not define one.

Parameters
array$page
Returns
‪array

Definition at line 1797 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\makeMenu().

◆ filterMenuPages()

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::filterMenuPages ( $data,
  $banUidArray,
  $spacer 
)

Checks if a page is OK to include in the final menu item array. Pages can be excluded if the doktype is wrong, if they are hidden in navigation, have a uid in the list of banned uids etc.

Parameters
array$data‪Array of menu items
array$banUidArray‪Array of page uids which are to be excluded
bool$spacer‪If set, then the page is a spacer.
Returns
‪bool Returns TRUE if the page can be safely included.
Exceptions

Definition at line 1322 of file AbstractMenuContentObject.php.

References $GLOBALS, and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getCurrentLanguageAspect().

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\makeMenu(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\removeInaccessiblePages().

◆ generate()

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::generate ( )

◆ getBannedUids()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getBannedUids ( )
protected

Returns an array of banned UIDs (from excludeUidList)

Returns
‪array Array of banned UIDs

Definition at line 2162 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\makeMenu(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\removeInaccessiblePages().

◆ getCache()

TYPO3 CMS Core Cache Frontend FrontendInterface TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getCache ( )
protected

◆ getCurrentLanguageAspect()

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getCurrentLanguageAspect ( )
protected

◆ getCurrentSite()

SiteInterface TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getCurrentSite ( )
protected

Returns the currently configured "site" if a site is configured (= resolved) in the current request.

Returns
‪SiteInterface
Exceptions

Definition at line 2379 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItemsForLanguageMenu().

◆ getDoktypeExcludeWhere()

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getDoktypeExcludeWhere ( )
protected

◆ getMPvar()

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getMPvar (   $key)
protected

Return MPvar string for entry $key in ->menuArr

Parameters
int$key‪Pointer to element in ->menuArr
Returns
‪string MP vars for element.
See also
link()

Definition at line 2134 of file AbstractMenuContentObject.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\link().

◆ getPageTitle()

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getPageTitle (   $title,
  $nav_title 
)
protected

Returns the title for the navigation

Parameters
string$title‪The current page title
string$nav_title‪The current value of the navigation title
Returns
‪string Returns the navigation title if it is NOT blank, otherwise the page title.

Definition at line 2122 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\writeMenu(), and TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\writeMenu().

◆ getParentContentObject()

TYPO3 CMS Frontend ContentObject ContentObjectRenderer TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getParentContentObject ( )

Returns the parent content object

Returns
‪\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer

Definition at line 2331 of file AbstractMenuContentObject.php.

◆ getParentMenuArr()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getParentMenuArr ( )

Get the parentMenuArr, if this is subMenu.

Returns
‪array

Definition at line 2443 of file AbstractMenuContentObject.php.

◆ getParentMenuItem()

array null TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getParentMenuItem ( )

Get the parentMenuItem from the parentMenuArr, if this is a subMenu

Returns
‪array|null

Definition at line 2453 of file AbstractMenuContentObject.php.

◆ getRuntimeCache()

TYPO3 CMS Core Cache Frontend FrontendInterface TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getRuntimeCache ( )
protected
Returns
‪\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface

Definition at line 2368 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\link().

◆ getSysPage()

TYPO3 CMS Frontend Page PageRepository TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getSysPage ( )

Returns the sys_page object

Returns
‪\TYPO3\CMS\Frontend\Page\PageRepository

Definition at line 2321 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\link().

◆ getTimeTracker()

TimeTracker TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getTimeTracker ( )
protected

◆ getTypoScriptFrontendController()

◆ hasParentMenuArr()

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::hasParentMenuArr ( )
protected

Check if there is an valid parentMenuArr.

Returns
‪bool

Definition at line 2409 of file AbstractMenuContentObject.php.

◆ hasParentMenuItem()

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::hasParentMenuItem ( )
protected

Check if the the parentMenuItem exists

Definition at line 2429 of file AbstractMenuContentObject.php.

◆ hasParentMenuItemKey()

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::hasParentMenuItemKey ( )
protected

Check if we have an parentMenutArrItemKey

Definition at line 2421 of file AbstractMenuContentObject.php.

◆ isActive()

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::isActive (   $uid,
  $MPvar = '' 
)
protected

Returns TRUE if the page with UID $uid is active (in the current rootline)

Parameters
int$uidPage uid to evaluate.
string$MPvar‪MPvar for the current position of item.
Returns
‪bool TRUE if page with $uid is active

Definition at line 1931 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\link().

◆ isCurrent()

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::isCurrent (   $uid,
  $MPvar = '' 
)
protected

Returns TRUE if the page with UID $uid is the CURRENT page (equals $this->getTypoScriptFrontendController()->id)

Parameters
int$uidPage uid to evaluate.
string$MPvar‪MPvar for the current position of item.
Returns
‪bool TRUE if page $uid = $this->getTypoScriptFrontendController()->id

Definition at line 1951 of file AbstractMenuContentObject.php.

◆ isItemState()

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::isItemState (   $kind,
  $key 
)
protected

Used by procesItemStates() to evaluate if a menu item (identified by $key) is in a certain state.

Parameters
string$kind‪The item state to evaluate (SPC, IFSUB, ACT etc... but no xxxRO states of course)
int$key‪Key pointing to menu item from ->menuArr
Returns
‪bool Returns TRUE if state matches
See also
procesItemStates()

Definition at line 2024 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\procesItemStates().

◆ isNext()

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::isNext (   $uid,
  $MPvar = '' 
)
protected

Returns TRUE if the page with UID $uid is the NEXT page in root line (which means a submenu should be drawn)

Parameters
int$uidPage uid to evaluate.
string$MPvar‪MPvar for the current position of item.
Returns
‪bool TRUE if page with $uid is active
See also
subMenu()

Definition at line 1911 of file AbstractMenuContentObject.php.

◆ isSubMenu()

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::isSubMenu (   $uid)
protected

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

Parameters
int$uidPage uid for which to search for a submenu
Returns
‪bool Returns TRUE if there was a submenu with items found

Definition at line 1964 of file AbstractMenuContentObject.php.

◆ link()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::link (   $key,
  $altTarget = '',
  $typeOverride = '' 
)
protected

Creates the URL, target and onclick values for the menu item link. Returns them in an array as key/value pairs for -tag attributes This function doesn't care about the url, because if we let the url be redirected, it will be logged in the stat!!!

Parameters
int$key‪Pointer to a key in the $this->menuArr array where the value for that key represents the menu item we are linking to (page record)
string$altTarget‪Alternative target
string$typeOverride‪Alternative type
Returns
‪array Returns an array with A-tag attributes as key/value pairs (HREF, TARGET and onClick)

Definition at line 1637 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$conf, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\changeLinksForAccessRestrictedPages(), TYPO3\CMS\Frontend\Page\PageRepository\DOKTYPE_LINK, TYPO3\CMS\Frontend\Page\PageRepository\DOKTYPE_SHORTCUT, TYPO3\CMS\Frontend\Page\PageRepository\getExtURL(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getMPvar(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getRuntimeCache(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getSysPage(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getTypoScriptFrontendController(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\isActive(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\menuTypoLink(), and TYPO3\CMS\Frontend\Page\PageRepository\SHORTCUT_MODE_RANDOM_SUBPAGE.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\writeMenu(), and TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\writeMenu().

◆ makeMenu()

◆ menuTypoLink()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::menuTypoLink (   $page,
  $oTarget,
  $no_cache,
  $script,
  $overrideArray = '',
  $addParams = '',
  $typeOverride = '' 
)
protected

Calls typolink to create menu item links.

Parameters
array$pagePage record (uid points where to link to)
string$oTarget‪Target frame/window
bool$no_cache‪TRUE if caching should be disabled
string$script‪Alternative script name (unused)
array | string$overrideArray‪Array to override values in $page, empty string to skip override
string$addParams‪Parameters to add to URL
int | string$typeOverride‪"type" value, empty string means "not set"
Returns
‪array See linkData

Definition at line 2188 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger().

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\link(), and TYPO3\CMS\Frontend\ContentObject\Menu\ImageMenuContentObject\makeImageMap().

◆ prepareMenuItems()

◆ prepareMenuItemsForBrowseMenu()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::prepareMenuItemsForBrowseMenu (   $specialValue,
  $sortingField,
  $additionalWhere 
)
protected

◆ prepareMenuItemsForDirectoryMenu()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::prepareMenuItemsForDirectoryMenu (   $specialValue,
  $sortingField 
)
protected

Fetches all menuitems if special = directory is set

Parameters
string$specialValue‪The value from special.value
string$sortingField‪The sorting field
Returns
‪array

Definition at line 759 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$id, and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getTypoScriptFrontendController().

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItems().

◆ prepareMenuItemsForKeywordsMenu()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::prepareMenuItemsForKeywordsMenu (   $specialValue,
  $sortingField 
)
protected

◆ prepareMenuItemsForLanguageMenu()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::prepareMenuItemsForLanguageMenu (   $specialValue)
protected

◆ prepareMenuItemsForRootlineMenu()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::prepareMenuItemsForRootlineMenu ( )
protected

Fetches all menuitems if special = rootline is set

Returns
‪array

Definition at line 1122 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger().

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItems().

◆ prepareMenuItemsForUpdatedMenu()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::prepareMenuItemsForUpdatedMenu (   $specialValue,
  $sortingField 
)
protected

◆ prepareMenuItemsForUserSpecificMenu()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::prepareMenuItemsForUserSpecificMenu (   $specialValue,
  $sortingField 
)
protected

Fetches all menuitems if special = userfunction is set

Parameters
string$specialValue‪The value from special.value
string$sortingField‪The sorting field
Returns
‪array

Definition at line 674 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItems().

◆ procesItemStates()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::procesItemStates (   $splitCount)
protected

Generating the per-menu-item configuration arrays based on the settings for item states (NO, RO, ACT, CUR etc) set in ->mconf (config for the current menu object) Basically it will produce an individual array for each menu item based on the item states. BUT in addition the "optionSplit" syntax for the values is ALSO evaluated here so that all property-values are "option-splitted" and the output will thus be resolved. Is called from the "generate" functions in the extension classes. The function is processor intensive due to the option split feature in particular. But since the generate function is not always called (since the ->result array may be cached, see makeMenu) it doesn't hurt so badly.

Parameters
int$splitCount‪Number of menu items in the menu
Returns
‪array An array with two keys: array($NOconf,$ROconf) - where $NOconf contains the resolved configuration for each item when NOT rolled-over and $ROconf contains the ditto for the mouseover state (if any)

Definition at line 1377 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\isItemState().

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\generate(), TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\generate(), and TYPO3\CMS\Frontend\ContentObject\Menu\ImageMenuContentObject\generate().

◆ removeInaccessiblePages()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::removeInaccessiblePages ( array  $pages)
protected

◆ sectionIndex()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::sectionIndex (   $altSortField,
  $pid = null 
)
protected

Generates a list of content objects with sectionIndex enabled available on a specific page

Used for menus with sectionIndex enabled

Parameters
string$altSortField‪Alternative sorting field
int$pid‪The page id to search for sections
Exceptions

Definition at line 2235 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Core\Context\LanguageAspect\OVERLAYS_MIXED.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItems().

◆ setATagParts()

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::setATagParts ( )
protected

Creates the tag parts for the current item (in $this->I, [A1] and [A2]) based on other information in this array (like $this->I['linkHREF'])

Definition at line 2107 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\writeMenu(), and TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\writeMenu().

◆ setParentMenu()

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::setParentMenu ( array  $menuArr = [],
  $menuItemKey 
)

Set the parentMenuArr and key to provide the parentMenu informations to the subMenu, special fur IProcFunc and itemArrayProcFunc user functions.

Parameters
array$menuArr
int$menuItemKey

Definition at line 2393 of file AbstractMenuContentObject.php.

◆ start()

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::start (   $tmpl,
  $sys_page,
  $id,
  $conf,
  $menuNumber,
  $objSuffix = '' 
)

The initialization of the object. This just sets some internal variables.

Parameters
TemplateService$tmpl‪The $this->getTypoScriptFrontendController()->tmpl object
PageRepository$sys_page‪The $this->getTypoScriptFrontendController()->sys_page object
int | string$id‪A starting point page id. This should probably be blank since the 'entryLevel' value will be used then.
array$conf‪The TypoScript configuration for the HMENU cObject
int$menuNumberMenu number; 1,2,3. Should probably be 1
string$objSuffix‪Submenu Object suffix. This offers submenus a way to use alternative configuration for specific positions in the menu; By default "1 = TMENU" would use "1." for the TMENU configuration, but if this string is set to eg. "a" then "1a." would be used for configuration instead (while "1 = " is still used for the overall object definition of "TMENU")
Returns
‪bool Returns TRUE on success
See also
‪\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::HMENU()

Definition at line 290 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$conf, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$entryLevel, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$id, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$menuNumber, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$MP_array, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$sys_page, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$tmpl, debug(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getTimeTracker(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getTypoScriptFrontendController(), and TYPO3\CMS\Core\TimeTracker\TimeTracker\setTSlogMessage().

◆ subMenu()

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::subMenu (   $uid,
  $objSuffix = '' 
)
protected

Creates a submenu level to the current level - if configured for.

Parameters
int$uidPage id of the current page for which a submenu MAY be produced (if conditions are met)
string$objSuffix‪Object prefix, see ->start()
Returns
‪string HTML content of the submenu

Definition at line 1853 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\extProc_afterLinking(), and TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\extProc_afterLinking().

◆ userProcess()

mixed TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::userProcess (   $mConfKey,
  $passVar 
)
protected

Calls a user function for processing of internal data. Used for the properties "IProcFunc" and "itemArrayProcFunc"

Parameters
string$mConfKey‪Key pointing for the property in the current ->mconf array holding possibly parameters to pass along to the function/method. Currently the keys used are "IProcFunc" and "itemArrayProcFunc".
mixed$passVar‪A variable to pass to the user function and which should be returned again from the user function. The idea is that the user function modifies this variable according to what you want to achieve and then returns it. For "itemArrayProcFunc" this variable is $this->menuArr, for "IProcFunc" it is $this->I
Returns
‪mixed The processed $passVar

Definition at line 2094 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\makeMenu(), TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\writeMenu(), and TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\writeMenu().

◆ writeMenu()

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::writeMenu ( )

Member Data Documentation

◆ $alternativeMenuTempArray

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$alternativeMenuTempArray = ''
protected

Can be set to contain menu item arrays for sub-levels.

Definition at line 253 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItems().

◆ $alwaysActivePIDlist

int [] TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$alwaysActivePIDlist = array( )
protected

Definition at line 133 of file AbstractMenuContentObject.php.

◆ $conf

◆ $debug

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$debug = false
protected

Definition at line 145 of file AbstractMenuContentObject.php.

◆ $deprecatedPublicMethods

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$deprecatedPublicMethods
protected
Initial value:
= array(
'subMenu' => 'Using subMenu() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'link' => 'Using link() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'procesItemStates' => 'Using procesItemStates() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'changeLinksForAccessRestrictedPages' => 'Using changeLinksForAccessRestrictedPages() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'isNext' => 'Using isNext() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'isActive' => 'Using isActive() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'isCurrent' => 'Using isCurrent() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'isSubMenu' => 'Using isSubMenu() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'isItemState' => 'Using isItemState() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'accessKey' => 'Using accessKey() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'userProcess' => 'Using userProcess() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'setATagParts' => 'Using setATagParts() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'getPageTitle' => 'Using getPageTitle() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'getMPvar' => 'Using getMPvar() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'getDoktypeExcludeWhere' => 'Using getDoktypeExcludeWhere() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'getBannedUids' => 'Using getBannedUids() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'menuTypoLink' => 'Using menuTypoLink() within HMENU is discouraged, as this is internal functionality that should not be exposed to the public.',
'extProc_RO' => 'Using extProc_RO() within HMENU extensions is discouraged, as rollover functionality will be removed in TYPO3 v10.0.',
'extProc_init' => 'Using extProc_init() within HMENU extensions is discouraged, as extending HMENU should only happens via userFunc options.',
'extProc_beforeLinking' => 'Using extProc_beforeLinking() within HMENU extensions is discouraged, as extending HMENU should only happens via userFunc options.',
'extProc_afterLinking' => 'Using extProc_afterLinking() within HMENU extensions is discouraged, as extending HMENU should only happens via userFunc options.',
'extProc_beforeAllWrap' => 'Using extProc_beforeAllWrap() within HMENU extensions is discouraged, as extending HMENU should only happens via userFunc options.',
'extProc_finish' => 'Using extProc_finish() within HMENU extensions is discouraged, as extending HMENU should only happens via userFunc options.',
'getBeforeAfter' => 'Using getBeforeAfter() within HMENU extensions is discouraged, as extending HMENU should only happens via userFunc options.',
)

Definition at line 80 of file AbstractMenuContentObject.php.

◆ $deprecatedPublicProperties

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$deprecatedPublicProperties
protected

Definition at line 47 of file AbstractMenuContentObject.php.

◆ $doktypeExcludeList

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$doktypeExcludeList = '6'
protected

Doktypes that define which should not be included in a menu

Definition at line 129 of file AbstractMenuContentObject.php.

◆ $entryLevel

int TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$entryLevel = 0
protected

◆ $GMENU_fixKey

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$GMENU_fixKey = 'gmenu'
protected

Definition at line 155 of file AbstractMenuContentObject.php.

◆ $hash

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$hash
protected

Definition at line 204 of file AbstractMenuContentObject.php.

◆ $I

mixed [] TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$I
protected

Definition at line 223 of file AbstractMenuContentObject.php.

◆ $id

◆ $imgNameNotRandom

int TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$imgNameNotRandom = 0
protected

Definition at line 141 of file AbstractMenuContentObject.php.

◆ $imgNamePrefix

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$imgNamePrefix = 'img'
protected

Definition at line 137 of file AbstractMenuContentObject.php.

◆ $INPfixMD5

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$INPfixMD5
protected

◆ $mconf

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$mconf = array( )
protected

xMENU configuration (TMENU, GMENU etc)

Definition at line 173 of file AbstractMenuContentObject.php.

◆ $menuArr

array [] TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$menuArr
protected

The array of menuItems which is built

Definition at line 200 of file AbstractMenuContentObject.php.

◆ $menuNumber

int TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$menuNumber = 1
protected

tells you which menu number this is. This is important when getting data from the setup

Definition at line 111 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\start().

◆ $MP_array

string [] TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$MP_array = array( )
protected

accumulation of mount point data

Definition at line 161 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\start().

◆ $nameAttribute

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$nameAttribute = 'name'
protected

Will be 'id' in XHTML-mode

Definition at line 259 of file AbstractMenuContentObject.php.

◆ $nextActive

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$nextActive
protected

Holds the page uid of the NEXT page in the root line from the page pointed to by entryLevel; Used to expand the menu automatically if in a certain root line.

Definition at line 194 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItemsForBrowseMenu().

◆ $parent_cObj

TYPO3 CMS Frontend ContentObject ContentObjectRenderer TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$parent_cObj

Loaded with the parent cObj-object when a new HMENU is made

Definition at line 151 of file AbstractMenuContentObject.php.

◆ $parentMenuArr

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$parentMenuArr
protected

Definition at line 276 of file AbstractMenuContentObject.php.

◆ $parentMenuArrItemKey

int null TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$parentMenuArrItemKey
protected

Array key of the parentMenuItem in the parentMenuArr, if this menu is a subMenu.

Definition at line 272 of file AbstractMenuContentObject.php.

◆ $result

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$result = array( )
protected

◆ $rL_uidRegister

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$rL_uidRegister
protected

Is filled with an array of page uid numbers + RL parameters which are in the current root line (used to evaluate whether a menu item is in active state)

Definition at line 215 of file AbstractMenuContentObject.php.

◆ $spacerIDList

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$spacerIDList = '199'
protected

The doktype-number that defines a spacer

Definition at line 123 of file AbstractMenuContentObject.php.

◆ $sys_page

TYPO3 CMS Frontend Page PageRepository TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$sys_page
protected

◆ $tmpl

TYPO3 CMS Core TypoScript TemplateService TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$tmpl
protected

◆ $useCacheHash

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$useCacheHash = false
protected

TRUE to use cHash in generated link (normally only for the language selector and if parameters exist in the URL).

Definition at line 266 of file AbstractMenuContentObject.php.

◆ $WMcObj

ContentObjectRenderer TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$WMcObj
protected

Definition at line 247 of file AbstractMenuContentObject.php.

◆ $WMextraScript

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$WMextraScript
protected

◆ $WMfreezePrefix

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$WMfreezePrefix
protected

Definition at line 231 of file AbstractMenuContentObject.php.

◆ $WMmenuItems

int TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$WMmenuItems
protected

◆ $WMresult

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$WMresult
protected

Definition at line 227 of file AbstractMenuContentObject.php.

◆ $WMsubmenuObjSuffixes

array [] TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$WMsubmenuObjSuffixes
protected

Definition at line 239 of file AbstractMenuContentObject.php.