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

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='')
 
 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

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

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

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
integerPointer to $this->menuArr[$key] where the current menu element record is found
Returns
void private
See also
writeMenu(), AbstractMenuContentObject::subMenu()
Todo:
Define visibility

Definition at line 517 of file GraphicalMenuContentObject.php.

◆ extProc_beforeAllWrap()

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

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

Parameters
stringThe current content of the menu item, $this->I['theItem'], passed along.
integerPointer 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 536 of file GraphicalMenuContentObject.php.

◆ extProc_beforeLinking()

TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::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 502 of file GraphicalMenuContentObject.php.

◆ 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 private
See also
writeMenu()
Todo:
Define visibility

Definition at line 548 of file GraphicalMenuContentObject.php.

◆ 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 private
See also
writeMenu()
Todo:
Define visibility

Definition at line 476 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
integerPointer 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 private
See also
writeMenu()
Todo:
Define visibility

Definition at line 489 of file GraphicalMenuContentObject.php.

◆ 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()
integer$itemsThe number of menu items
array$HobjsArray with "applyTotalH" numbers
array$WobjsArray with "applyTotalW" numbers
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. private
See also
makeGifs()
Todo:
Define visibility

Definition at line 282 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()
Todo:
Define visibility

Definition at line 34 of file GraphicalMenuContentObject.php.

References $GLOBALS, debug(), 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 private
See also
generate()
Todo:
Define visibility

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\Core\Utility\GeneralUtility\intExplode(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Core\Utility\GeneralUtility\png_to_gif_by_imagemagick().

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(); )
Todo:
Define visibility

Definition at line 364 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_init(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getPageTitle(), TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\link(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().