TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject:
TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject

Public Member Functions

 generate ()
 
 makeGifs ($conf, $resKey)
 
 findLargestDims ($conf, $items, $Hobjs, $Wobjs, $minDim, $maxDim)
 
 writeMenu ()
 
 extProc_init ()
 
 extProc_RO ($key)
 
 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='')
 
 makeMenu ()
 
 generate ()
 
 writeMenu ()
 
 filterMenuPages (&$data, $banUidArray, $spacer)
 
 procesItemStates ($splitCount)
 
 link ($key, $altTarget='', $typeOverride='')
 
 changeLinksForAccessRestrictedPages (&$LD, $page, $mainTarget, $typeOverride)
 
 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 ()
 
 setParentMenu (array $menuArr=[], $menuItemKey)
 
 getParentMenuArr ()
 
 getParentMenuItem ()
 

Additional Inherited Members

- Public Attributes inherited from TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject
 $menuNumber = 1
 
 $entryLevel = 0
 
 $spacerIDList = '199'
 
 $doktypeExcludeList = '6'
 
 $alwaysActivePIDlist = []
 
 $imgNamePrefix = 'img'
 
 $imgNameNotRandom = 0
 
 $debug = 0
 
 $parent_cObj = null
 
 $GMENU_fixKey = 'gmenu'
 
 $MP_array = []
 
 $conf = []
 
 $mconf = []
 
 $tmpl = null
 
 $sys_page = null
 
 $id
 
 $nextActive
 
 $menuArr
 
 $hash
 
 $result = []
 
 $rL_uidRegister
 
 $INPfixMD5
 
 $I
 
 $WMresult
 
 $WMfreezePrefix
 
 $WMmenuItems
 
 $WMsubmenuObjSuffixes
 
 $WMextraScript
 
 $WMcObj = null
 
 $alternativeMenuTempArray = ''
 
 $nameAttribute = 'name'
 
 $parentMenuArr = []
 
- Protected Member Functions inherited from TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject
 removeInaccessiblePages (array $pages)
 
 prepareMenuItemsForUserSpecificMenu ($specialValue, $sortingField)
 
 prepareMenuItemsForLanguageMenu ($specialValue)
 
 prepareMenuItemsForDirectoryMenu ($specialValue, $sortingField)
 
 prepareMenuItemsForUpdatedMenu ($specialValue, $sortingField)
 
 prepareMenuItemsForKeywordsMenu ($specialValue, $sortingField)
 
 prepareMenuItemsForRootlineMenu ()
 
 prepareMenuItemsForBrowseMenu ($specialValue, $sortingField, $additionalWhere)
 
 determineOriginalShortcutPage (array $page)
 
 sectionIndex ($altSortField, $pid=null)
 
 getDatabaseConnection ()
 
 getTypoScriptFrontendController ()
 
 getTimeTracker ()
 
 getCache ()
 
 getRuntimeCache ()
 
 hasParentMenuArr ()
 
 hasParentMenuItemKey ()
 
 hasParentMenuItem ()
 
- Protected Attributes inherited from TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject
 $useCacheHash = false
 
 $parentMenuArrItemKey
 

Detailed Description

Extension class creating graphic based menus (PNG or GIF files)

Definition at line 24 of file GraphicalMenuContentObject.php.

Member Function Documentation

◆ extProc_afterLinking()

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

Called right after the creation of links for the menu item. This is also the last function call before the for-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. Further this calls the subMenu function in the parent class to create any submenu there might be.

Parameters
int$keyPointer to $this->menuArr[$key] where the current menu element record is found
Returns
void

Definition at line 520 of file GraphicalMenuContentObject.php.

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

◆ extProc_beforeAllWrap()

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

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

Parameters
string$itemThe current content of the menu item, $this->I['theItem'], passed along.
int$keyPointer to $this->menuArr[$key] where the current menu element record is found (unused)
Returns
string The modified version of $item, going back into $this->I['theItem']

Definition at line 539 of file GraphicalMenuContentObject.php.

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

◆ extProc_beforeLinking()

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

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

Parameters
int$keyPointer to $this->menuArr[$key] where the current menu element record is found
Returns
void

Definition at line 505 of file GraphicalMenuContentObject.php.

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

◆ extProc_finish()

TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::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

Definition at line 551 of file GraphicalMenuContentObject.php.

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

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

◆ extProc_init()

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

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

Returns
void

Definition at line 481 of file GraphicalMenuContentObject.php.

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

◆ extProc_RO()

TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::extProc_RO (   $key)

Called after all processing for RollOver of an element has been done.

Parameters
int$keyPointer to $this->menuArr[$key] where the current menu element record is found OR $this->result['RO'][$key] where the configuration for that elements RO version is found!
Returns
void

Definition at line 493 of file GraphicalMenuContentObject.php.

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

◆ findLargestDims()

TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::findLargestDims (   $conf,
  $items,
  $Hobjs,
  $Wobjs,
  $minDim,
  $maxDim 
)

Function searching for the largest width and height of the menu items to be generated. Uses some of the same code as makeGifs and even instantiates some gifbuilder objects BUT does not render the images - only reading out which width they would have. Remember to upgrade the code in here if the makeGifs function is updated.

Parameters
array$confSame configuration array as passed to makeGifs()
int$itemsThe number of menu items
array$HobjsArray with "applyTotalH" numbers (unused)
array$WobjsArray with "applyTotalW" numbers (unused)
array$minDimArray with "min" x/y
array$maxDimArray with "max" x/y
Returns
array Array with keys "H" and "W" which are in themselves arrays with the heights and widths of menu items inside. This can be used to find the max/min size of the menu items.

Definition at line 284 of file GraphicalMenuContentObject.php.

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

Referenced by TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\makeGifs().

◆ generate()

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

Calls procesItemStates() so that the common configuration for the menu items are resolved into individual configuration per item. Calls makeGifs() for all "normal" items and if configured for, also the "rollover" items.

Returns
void
See also
AbstractMenuContentObject::procesItemStates(), makeGifs()

Definition at line 33 of file GraphicalMenuContentObject.php.

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

◆ makeGifs()

TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::makeGifs (   $conf,
  $resKey 
)

Will traverse input array with configuration per-item and create corresponding GIF files for the menu. The data of the files are stored in $this->result

Parameters
array$confArray with configuration for each item.
string$resKeyType of images: normal ("NO") or rollover ("RO"). Valid values are "NO" and "RO
Returns
void

Definition at line 78 of file GraphicalMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$conf, $GLOBALS, TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\findLargestDims(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getTypoScriptFrontendController(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

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

◆ writeMenu()

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

Traverses the ->result['NO'] array of menu items configuration (made by ->generate()) and renders the HTML of each item (the images themselves was made with makeGifs() before this. See ->generate()) 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 GMENU_LAYERS

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

Definition at line 367 of file GraphicalMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$INPfixMD5, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$WMmenuItems, TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\accessKey(), TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\extProc_afterLinking(), TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\extProc_beforeAllWrap(), TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\extProc_beforeLinking(), TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\extProc_finish(), TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\extProc_init(), TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\extProc_RO(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getPageTitle(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getTypoScriptFrontendController(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\link(), TYPO3\CMS\Core\Utility\GeneralUtility\quoteJSvalue(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\setATagParts(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\userProcess().