TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
GraphicalMenuContentObject Class Reference
Inheritance diagram for GraphicalMenuContentObject:
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 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 AbstractMenuContentObject
 $menuNumber = 1
 
 $entryLevel = 0
 
 $spacerIDList = '199'
 
 $doktypeExcludeList = '6'
 
 $alwaysActivePIDlist = []
 
 $imgNamePrefix = 'img'
 
 $imgNameNotRandom = 0
 
 $debug = false
 
 $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 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)
 
 getTypoScriptFrontendController ()
 
 getTimeTracker ()
 
 getCache ()
 
 getRuntimeCache ()
 
 hasParentMenuArr ()
 
 hasParentMenuItemKey ()
 
 hasParentMenuItem ()
 
- Protected Attributes inherited from 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 (   $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 GraphicalMenuContentObject\writeMenu().

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 GraphicalMenuContentObject\writeMenu().

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 GraphicalMenuContentObject\writeMenu().

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 AbstractMenuContentObject\$WMextraScript.

Referenced by GraphicalMenuContentObject\writeMenu().

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 GraphicalMenuContentObject\writeMenu().

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 GraphicalMenuContentObject\writeMenu().

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 AbstractMenuContentObject\$conf, GeneralUtility\intExplode(), and GeneralUtility\makeInstance().

Referenced by GraphicalMenuContentObject\makeGifs().

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(), AbstractMenuContentObject\getTypoScriptFrontendController(), GraphicalMenuContentObject\makeGifs(), and AbstractMenuContentObject\procesItemStates().

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 AbstractMenuContentObject\$conf, $GLOBALS, GraphicalMenuContentObject\findLargestDims(), AbstractMenuContentObject\getTypoScriptFrontendController(), GeneralUtility\intExplode(), and GeneralUtility\makeInstance().

Referenced by GraphicalMenuContentObject\generate().

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 AbstractMenuContentObject\$INPfixMD5, AbstractMenuContentObject\$WMmenuItems, AbstractMenuContentObject\accessKey(), GraphicalMenuContentObject\extProc_afterLinking(), GraphicalMenuContentObject\extProc_beforeAllWrap(), GraphicalMenuContentObject\extProc_beforeLinking(), GraphicalMenuContentObject\extProc_finish(), GraphicalMenuContentObject\extProc_init(), GraphicalMenuContentObject\extProc_RO(), AbstractMenuContentObject\getPageTitle(), AbstractMenuContentObject\getTypoScriptFrontendController(), AbstractMenuContentObject\link(), GeneralUtility\quoteJSvalue(), AbstractMenuContentObject\setATagParts(), and AbstractMenuContentObject\userProcess().