‪TYPO3CMS  ‪main
TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject:
TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject TYPO3\CMS\Frontend\Tests\Unit\ContentObject\Menu\Fixtures\AbstractMenuContentObjectFixture

Public Member Functions

bool start ($_, $sys_page, $id, $conf, int $menuNumber, string $objSuffix, ServerRequestInterface $request)
 
 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

 removeInaccessiblePages (array $pages)
 
array prepareMenuItems ()
 
array prepareMenuItemsForUserSpecificMenu ($specialValue, $sortingField)
 
array prepareMenuItemsForLanguageMenu ($specialValue)
 
 buildPageRepository (LanguageAspect $languageAspect=null)
 
array prepareMenuItemsForDirectoryMenu ($specialValue, $sortingField)
 
array prepareMenuItemsForListMenu ($specialValue)
 
array prepareMenuItemsForUpdatedMenu ($specialValue, $sortingField)
 
array prepareMenuItemsForKeywordsMenu ($specialValue, $sortingField)
 
array prepareMenuItemsForRootlineMenu ()
 
array prepareMenuItemsForBrowseMenu ($specialValue, $sortingField, $additionalWhere)
 
array processItemStates ($splitCount)
 
LinkResultInterface null link ($key, $altTarget, $typeOverride)
 
string subMenu (int $uid, string $objSuffix, int $menuItemKey)
 
bool isNext ($uid, $MPvar)
 
bool isActive (array $page, $MPvar)
 
bool isCurrent (array $page, $MPvar)
 
bool isSubMenu ($uid)
 
 getCacheIdentifierForSubMenuDecision ($uid)
 
bool isItemState ($kind, $key)
 
mixed userProcess ($mConfKey, $passVar)
 
 setATagParts (?LinkResultInterface $linkResult)
 
string getPageTitle ($title, $nav_title)
 
string getMPvar ($key)
 
string getDoktypeExcludeWhere ()
 
array getBannedUids ()
 
 menuTypoLink (array $page, string $oTarget, $addParams, $typeOverride, ?int $overridePageId=null)
 
array sectionIndex ($altSortField, $pid=null)
 
 getTypoScriptFrontendController ()
 
 getCurrentLanguageAspect ()
 
 getTimeTracker ()
 
 getCache ()
 
 getRuntimeCache ()
 
 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( )
 
PageRepository $sys_page
 
int $id
 
string $nextActive
 
array[] $menuArr
 
string $hash
 
array $result = array( )
 
array $rL_uidRegister
 
mixed[] $I
 
ServerRequestInterface $request
 
array $alternativeMenuTempArray = []
 
int null $parentMenuArrItemKey
 
array $parentMenuArr
 
bool $disableGroupAccessCheck = false
 
const customItemStates
 

Private Member Functions

 getMode (string $mode='')
 
int getRootlineLevel (array $rootLine, string $list)
 

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

Member Function Documentation

◆ buildPageRepository()

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::buildPageRepository ( LanguageAspect  $languageAspect = null)
protected

Builds PageRepository instance without depending on global context, e.g. not automatically overlaying records based on current request language.

Definition at line 603 of file AbstractMenuContentObject.php.

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

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

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

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

◆ generate()

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

Calls processItemStates() so that the common configuration for the menu items are resolved into individual configuration per item. Sets the result for the new "normal state" in $this->result

See also
AbstractMenuContentObject::processItemStates()

Definition at line 396 of file AbstractMenuContentObject.php.

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

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

◆ getBannedUids()

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

◆ getCache()

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

Definition at line 1772 of file AbstractMenuContentObject.php.

◆ getCacheIdentifierForSubMenuDecision()

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

◆ getCurrentLanguageAspect()

◆ getCurrentSite()

◆ getDoktypeExcludeWhere()

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

◆ getMode()

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getMode ( string  $mode = '')
private

◆ getMPvar()

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

◆ 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 1540 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 1745 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 ( )

◆ getRootlineLevel()

int TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::getRootlineLevel ( array  $rootLine,
string  $list 
)
private

Returns the level of the given page in the rootline - Multiple pages can be given by separating the UIDs by comma.

Parameters
string$list‪A list of UIDs for which the rootline-level should get returned
Returns
‪int The level in the rootline. If more than one page was given the lowest level will get returned.

Definition at line 1895 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\inList().

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

◆ getRuntimeCache()

◆ getSysPage()

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

Returns the sys_page object

Returns
‪PageRepository

Definition at line 1735 of file AbstractMenuContentObject.php.

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

◆ getTimeTracker()

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

Check if we have a parentMenuArrItemKey

Definition at line 1822 of file AbstractMenuContentObject.php.

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

◆ isActive()

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::isActive ( array  $page,
  $MPvar 
)
protected

Returns TRUE if the given page is active (in the current rootline)

Parameters
array$pagePage record to evaluate.
string$MPvar‪MPvar for the current position of item.
Returns
‪bool TRUE if $page is active

Definition at line 1325 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Webhooks\Message\$uid.

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

◆ isCurrent()

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::isCurrent ( array  $page,
  $MPvar 
)
protected

Returns TRUE if the page is the CURRENT page.

Parameters
array$pagePage record to evaluate.
string$MPvar‪MPvar for the current position of item.
Returns
‪bool TRUE if resolved page ID is current requested page id

Definition at line 1362 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

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

References TYPO3\CMS\Webhooks\Message\$uid.

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

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

References TYPO3\CMS\Webhooks\Message\$uid, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getBannedUids(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getCacheIdentifierForSubMenuDecision(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getCurrentLanguageAspect(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getRuntimeCache().

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

◆ link()

LinkResultInterface null TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::link (   $key,
  $altTarget,
  $typeOverride 
)
protected

Creates the URL, target and data-window-* attributes for the menu item link. Returns them in an array as key/value pairs for -tag attributes

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
‪LinkResultInterface|null

Definition at line 1172 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getMPvar(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getRuntimeCache(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\menuTypoLink().

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

◆ makeMenu()

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

Creates the menu in the internal variables, ready for output. Basically this will read the page records needed and fill in the internal $this->menuArr Based on a hash of this array and some other variables the $this->result variable will be loaded either from cache OR by calling the generate() method of the class to create the menu for real.

Definition at line 324 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_SPACER, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\generate(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getTypoScriptFrontendController(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItems(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\removeInaccessiblePages(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\userProcess().

◆ menuTypoLink()

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::menuTypoLink ( array  $page,
string  $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

Reimplemented in TYPO3\CMS\Frontend\Tests\Unit\ContentObject\Menu\Fixtures\AbstractMenuContentObjectFixture.

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

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

Main function for retrieving menu items based on the menu type (special or sectionIndex or "normal")

Returns
‪array

Definition at line 447 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$alternativeMenuTempArray, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getCacheIdentifierForSubMenuDecision(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getDoktypeExcludeWhere(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getRuntimeCache(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItemsForBrowseMenu(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItemsForDirectoryMenu(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItemsForKeywordsMenu(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItemsForLanguageMenu(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItemsForListMenu(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItemsForRootlineMenu(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItemsForUpdatedMenu(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\prepareMenuItemsForUserSpecificMenu(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\sectionIndex().

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

◆ prepareMenuItemsForBrowseMenu()

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

Fetches all menuitems if special = browse is set

Parameters
string$specialValue‪The value from special.value
string$sortingField‪The sorting field
string$additionalWhere‪Additional WHERE clause
Returns
‪array

Definition at line 957 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$nextActive, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getDoktypeExcludeWhere(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\removeInaccessiblePages().

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

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

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$id, 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()

◆ prepareMenuItemsForListMenu()

array TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::prepareMenuItemsForListMenu (   $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 902 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 524 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 1131 of file AbstractMenuContentObject.php.

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

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

◆ removeInaccessiblePages()

◆ 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

Reimplemented in TYPO3\CMS\Frontend\Tests\Unit\ContentObject\Menu\Fixtures\AbstractMenuContentObjectFixture.

Definition at line 1656 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$result, TYPO3\CMS\Webhooks\Message\$uid, and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getCurrentLanguageAspect().

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

◆ setATagParts()

TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::setATagParts ( ?LinkResultInterface  $linkResult)
protected

Creates the tag parts for the current item (in $this->I, [A1] and [A2]) based on the given link result

Definition at line 1527 of file AbstractMenuContentObject.php.

References TYPO3\CMS\Frontend\Typolink\LinkResultInterface\getAttributes().

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
int$menuItemKey

Definition at line 1794 of file AbstractMenuContentObject.php.

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

◆ start()

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::start (   $_,
  $sys_page,
  $id,
  $conf,
int  $menuNumber,
string  $objSuffix,
ServerRequestInterface  $request 
)

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

Parameters
null$_‪Obsolete argument
PageRepository$sys_page
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 188 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\$request, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$sys_page, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getRootlineLevel(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getTimeTracker(), and TYPO3\CMS\Core\Utility\GeneralUtility\intExplode().

◆ subMenu()

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

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

Member Data Documentation

◆ $alternativeMenuTempArray

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

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

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

◆ $conf

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

◆ $disableGroupAccessCheck

bool TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$disableGroupAccessCheck = false
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 69 of file AbstractMenuContentObject.php.

◆ $hash

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

Unused

Definition at line 124 of file AbstractMenuContentObject.php.

◆ $I

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

Definition at line 139 of file AbstractMenuContentObject.php.

◆ $id

◆ $mconf

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

xMENU configuration (TMENU etc)

Definition at line 97 of file AbstractMenuContentObject.php.

◆ $menuArr

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

The array of menuItems which is built

Definition at line 120 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 57 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 114 of file AbstractMenuContentObject.php.

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

◆ $parent_cObj

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

◆ $parentMenuArr

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

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

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

◆ $request

ServerRequestInterface TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::$request
protected

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

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

◆ $sys_page

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

◆ customItemStates

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

Definition at line 160 of file AbstractMenuContentObject.php.