TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject:
TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject tslib_tmenu

Public Member Functions

 generate ()
 
 writeMenu ()
 
 getBeforeAfter ($pref)
 
 extProc_init ()
 
 extProc_beforeLinking ($key)
 
 extProc_afterLinking ($key)
 
 extProc_beforeAllWrap ($item, $key)
 
 extProc_finish ()
 
- Public Member Functions inherited from TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject
 start (&$tmpl, &$sys_page, $id, $conf, $menuNumber, $objSuffix='')
 
 filterMenuPages (&$data, $banUidArray, $spacer)
 
 procesItemStates ($splitCount)
 
 link ($key, $altTarget='', $typeOverride='')
 
 changeLinksForAccessRestrictedPages (&$LD, $page, $mainTarget, $typeOverride)
 
 subMenu ($uid, $objSuffix='')
 
 isNext ($uid, $MPvar='')
 
 isActive ($uid, $MPvar='')
 
 isCurrent ($uid, $MPvar='')
 
 isSubMenu ($uid)
 
 isItemState ($kind, $key)
 
 accessKey ($title)
 
 userProcess ($mConfKey, $passVar)
 
 setATagParts ()
 
 getPageTitle ($title, $nav_title)
 
 getMPvar ($key)
 
 getDoktypeExcludeWhere ()
 
 getBannedUids ()
 
 menuTypoLink ($page, $oTarget, $no_cache, $script, $overrideArray='', $addParams='', $typeOverride='')
 
 getSysPage ()
 
 getParentContentObject ()
 

Additional Inherited Members

- Public Attributes inherited from TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject
 $menuNumber = 1
 
 $entryLevel = 0
 
 $spacerIDList = '199'
 
 $doktypeExcludeList = '6'
 
 $alwaysActivePIDlist = array()
 
 $imgNamePrefix = 'img'
 
 $imgNameNotRandom = 0
 
 $debug = 0
 
 $parent_cObj
 
 $GMENU_fixKey = 'gmenu'
 
 $MP_array = array()
 
 $conf = array()
 
 $mconf = array()
 
 $tmpl
 
 $sys_page
 
 $id
 
 $nextActive
 
 $menuArr
 
 $hash
 
 $result = array()
 
 $rL_uidRegister = ''
 
 $INPfixMD5
 
 $I
 
 $WMresult
 
 $WMfreezePrefix
 
 $WMmenuItems
 
 $WMsubmenuObjSuffixes
 
 $WMextraScript
 
 $alternativeMenuTempArray = ''
 
 $nameAttribute = 'name'
 
- Protected Member Functions inherited from TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject
 removeInaccessiblePages (array $pages)
 
 determineOriginalShortcutPage (array $page)
 
 sectionIndex ($altSortField, $pid=NULL)
 
 getCache ()
 
- Protected Attributes inherited from TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject
 $useCacheHash = FALSE
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Extension class creating text based menus

Author
Kasper Skårhøj kaspe.nosp@m.rYYY.nosp@m.Y@typ.nosp@m.o3.c.nosp@m.om

Definition at line 22 of file TextMenuContentObject.php.

Member Function Documentation

◆ extProc_afterLinking()

TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject::extProc_afterLinking (   $key)

Called right after the creation of links for the menu item. This is also the last function call before the while-loop traversing menu items goes to the next item. This function MUST set $this->WMresult.=[HTML for menu item] to add the generated menu item to the internal accumulation of items.

Parameters
integerPointer to $this->menuArr[$key] where the current menu element record is found
Returns
void private
See also
writeMenu()
Todo:
Define visibility

Definition at line 239 of file TextMenuContentObject.php.

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

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

◆ extProc_beforeAllWrap()

TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject::extProc_beforeAllWrap (   $item,
  $key 
)

Called before the "allWrap" happens on the menu item.

Parameters
string$itemThe current content of the menu item, $this->I['theItem'], passed along.
integer$keyPointer to $this->menuArr[$key] where the current menu element record is found
Returns
string The modified version of $item, going back into $this->I['theItem'] private
See also
writeMenu()
Todo:
Define visibility

Definition at line 258 of file TextMenuContentObject.php.

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

◆ extProc_beforeLinking()

TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject::extProc_beforeLinking (   $key)

Called right before the creation of the link for the menu item

Parameters
integerPointer to $this->menuArr[$key] where the current menu element record is found
Returns
void private
See also
writeMenu()
Todo:
Define visibility

Definition at line 225 of file TextMenuContentObject.php.

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

◆ extProc_finish()

TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject::extProc_finish ( )

Called before the writeMenu() function returns (only if a menu was generated)

Returns
string The total menu content should be returned by this function private
See also
writeMenu()
Todo:
Define visibility

Definition at line 270 of file TextMenuContentObject.php.

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

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

◆ extProc_init()

TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject::extProc_init ( )

Called right before the traversing of $this->result begins. Can be used for various initialization

Returns
void private
See also
writeMenu()
Todo:
Define visibility

Definition at line 212 of file TextMenuContentObject.php.

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

◆ generate()

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

Calls procesItemStates() 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

Returns
void
See also
AbstractMenuContentObject::procesItemStates()
Todo:
Define visibility

Definition at line 32 of file TextMenuContentObject.php.

References debug(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\procesItemStates().

◆ getBeforeAfter()

TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject::getBeforeAfter (   $pref)

Generates the before* and after* images for TMENUs

Parameters
string$prefCan be "before" or "after" and determines which kind of image to create (basically this is the prefix of the TypoScript properties that are read from the ->I['val'] array
Returns
string The resulting HTML of the image, if any.
Todo:
Define visibility

Definition at line 178 of file TextMenuContentObject.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\png_to_gif_by_imagemagick().

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

◆ writeMenu()

TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject::writeMenu ( )

Traverses the ->result array of menu items configuration (made by ->generate()) and renders each item. During the execution of this function many internal methods prefixed "extProc_" from this class is called and many of these are for now dummy functions. But they can be used for processing as they are used by the TMENU_LAYERS An instance of ContentObjectRenderer is also made and for each menu item rendered it is loaded with the record for that page so that any stdWrap properties that applies will have the current menu items record available.

Returns
string The HTML for the menu (returns result through $this->extProc_finish(); )
Todo:
Define visibility

Definition at line 53 of file TextMenuContentObject.php.

References $GLOBALS, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$INPfixMD5, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\accessKey(), TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\extProc_afterLinking(), TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\extProc_beforeAllWrap(), TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\extProc_beforeLinking(), TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\extProc_finish(), TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\extProc_init(), TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject\getBeforeAfter(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getPageTitle(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\link(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\setATagParts(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\userProcess().