‪TYPO3CMS  10.4
TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject:
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, $isSpacerPage)
 
PageRepository getSysPage ()
 
ContentObjectRenderer getParentContentObject ()
 
 setParentMenu (array $menuArr, $menuItemKey)
 
array getParentMenuArr ()
 
array null getParentMenuItem ()
 

Public Attributes

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)
 
array processItemStates ($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, $addParams, $typeOverride, ?int $overridePageId=null)
 
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

int $menuNumber = 1
 
int $entryLevel = 0
 
int[] $excludedDoktypes = array( PageRepository::DOKTYPE_BE_USER_SECTION, PageRepository::DOKTYPE_SYSFOLDER )
 
int[] $alwaysActivePIDlist = array( )
 
string[] $MP_array = array( )
 
array $conf = array( )
 
array $mconf = array( )
 
TemplateService $tmpl
 
PageRepository $sys_page
 
int $id
 
string $nextActive
 
array[] $menuArr
 
string $hash
 
array $result = array( )
 
array $rL_uidRegister
 
mixed[] $I
 
string $WMresult
 
int $WMmenuItems
 
array[] $WMsubmenuObjSuffixes
 
ContentObjectRenderer $WMcObj
 
string $alternativeMenuTempArray = ''
 
int null $parentMenuArrItemKey
 
array $parentMenuArr
 
const customItemStates
 

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 TextMenuContentObject.

Definition at line 45 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 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 1714 of file AbstractMenuContentObject.php.

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

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

◆ 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 1474 of file AbstractMenuContentObject.php.

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

◆ 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 1445 of file AbstractMenuContentObject.php.

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

◆ filterMenuPages()

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

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$isSpacerPage‪If set, then the page is a spacer.
Returns
‪bool Returns TRUE if the page can be safely included.
Exceptions

Definition at line 1178 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 ( )

Generates the the menu data.

Subclasses should overwrite this method.

Reimplemented in TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject.

Definition at line 444 of file AbstractMenuContentObject.php.

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

◆ getBannedUids()

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

◆ getCache()

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

Definition at line 2001 of file AbstractMenuContentObject.php.

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

◆ getCurrentLanguageAspect()

◆ 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

Definition at line 2019 of file AbstractMenuContentObject.php.

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

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 1782 of file AbstractMenuContentObject.php.

References $GLOBALS, and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$MP_array.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\isItemState(), and 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 1770 of file AbstractMenuContentObject.php.

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

◆ getParentContentObject()

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

Returns the parent content object

Returns
ContentObjectRenderer

Definition at line 1972 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$parent_cObj.

◆ getParentMenuArr()

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

◆ getParentMenuItem()

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

◆ 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 2009 of file AbstractMenuContentObject.php.

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

◆ getSysPage()

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

Returns the sys_page object

Returns
‪PageRepository

Definition at line 1962 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$sys_page.

◆ getTimeTracker()

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

◆ getTypoScriptFrontendController()

◆ hasParentMenuArr()

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

◆ hasParentMenuItem()

◆ hasParentMenuItemKey()

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

◆ 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 1579 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\isItemState(), and 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 1599 of file AbstractMenuContentObject.php.

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

◆ isItemState()

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

Used by processItemStates() 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...)
int$key‪Key pointing to menu item from ->menuArr
Returns
‪bool Returns TRUE if state matches
See also
processItemStates()

Definition at line 1672 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getMPvar(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\isActive(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\isCurrent(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\isSubMenu().

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

◆ 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 1559 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 1612 of file AbstractMenuContentObject.php.

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

◆ 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 1283 of file AbstractMenuContentObject.php.

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

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

◆ makeMenu()

◆ menuTypoLink()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::menuTypoLink (   $page,
  $oTarget,
  $addParams,
  $typeOverride,
?int  $overridePageId = null 
)
protected

Calls typolink to create menu item links.

Parameters
array$pagePage record (uid points where to link to)
string$oTarget‪Target frame/window
string$addParams‪Parameters to add to URL
int | string$typeOverride‪"type" value, empty string means "not set"
int | null$overridePageId‪link to this page instead of the $page[uid] value
Returns
‪array See linkData

Definition at line 1834 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$conf, and TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger().

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

◆ 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 640 of file AbstractMenuContentObject.php.

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

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 1003 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 559 of file AbstractMenuContentObject.php.

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

◆ processItemStates()

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

Generating the per-menu-item configuration arrays based on the settings for item states (NO, 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 the resolved configuration for each item

Definition at line 1241 of file AbstractMenuContentObject.php.

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

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\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 1876 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$result, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getCurrentLanguageAspect(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getTypoScriptFrontendController(), and 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 1755 of file AbstractMenuContentObject.php.

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

◆ setParentMenu()

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

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

Parameters
array$menuArr
int$menuItemKey

Definition at line 2037 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$menuArr.

◆ 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 199 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, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getTimeTracker(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getTypoScriptFrontendController(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), 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 1501 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\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 1742 of file AbstractMenuContentObject.php.

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

◆ writeMenu()

string TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::writeMenu ( )
Returns
‪string The HTML for the menu

Reimplemented in TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject.

Definition at line 451 of file AbstractMenuContentObject.php.

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 159 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 67 of file AbstractMenuContentObject.php.

◆ $conf

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

◆ $entryLevel

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

◆ $excludedDoktypes

int [] TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$excludedDoktypes = array( PageRepository::DOKTYPE_BE_USER_SECTION, PageRepository::DOKTYPE_SYSFOLDER )
protected

Doktypes that define which should not be included in a menu

Definition at line 63 of file AbstractMenuContentObject.php.

◆ $hash

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

Definition at line 122 of file AbstractMenuContentObject.php.

◆ $I

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

Definition at line 137 of file AbstractMenuContentObject.php.

◆ $id

◆ $mconf

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

xMENU configuration (TMENU etc)

Definition at line 91 of file AbstractMenuContentObject.php.

◆ $menuArr

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

The array of menuItems which is built

Definition at line 118 of file AbstractMenuContentObject.php.

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

◆ $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 51 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

◆ $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 112 of file AbstractMenuContentObject.php.

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

◆ $parent_cObj

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

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

Definition at line 73 of file AbstractMenuContentObject.php.

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

◆ $parentMenuArr

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

Definition at line 169 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 165 of file AbstractMenuContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getParentMenuItem(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\hasParentMenuItemKey().

◆ $result

◆ $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 133 of file AbstractMenuContentObject.php.

◆ $sys_page

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

◆ $tmpl

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

◆ $WMcObj

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

Definition at line 153 of file AbstractMenuContentObject.php.

◆ $WMmenuItems

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

Definition at line 145 of file AbstractMenuContentObject.php.

◆ $WMresult

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

Definition at line 141 of file AbstractMenuContentObject.php.

◆ $WMsubmenuObjSuffixes

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

Definition at line 149 of file AbstractMenuContentObject.php.

◆ customItemStates

const TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::customItemStates
protected
Initial value:
= [
'IFSUB',
'ACT',
'ACTIFSUB',
'CUR',
'CURIFSUB',
'USR',
'SPC',
'USERDEF1',
'USERDEF2'
]

Definition at line 171 of file AbstractMenuContentObject.php.