‪TYPO3CMS  9.5
TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject:
TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait

Public Member Functions

 __construct ()
 
 generate ()
 
 makeGifs ($conf, $resKey)
 
array findLargestDims ($conf, $items, $Hobjs, $Wobjs, $minDim, $maxDim)
 
string writeMenu ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject
bool start ($tmpl, $sys_page, $id, $conf, $menuNumber, $objSuffix='')
 
 makeMenu ()
 
bool filterMenuPages (&$data, $banUidArray, $spacer)
 
TYPO3 CMS Frontend Page PageRepository getSysPage ()
 
TYPO3 CMS Frontend ContentObject ContentObjectRenderer getParentContentObject ()
 
 setParentMenu (array $menuArr=[], $menuItemKey)
 
array getParentMenuArr ()
 
array null getParentMenuItem ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait
bool __isset (string $propertyName)
 
mixed __get (string $propertyName)
 
 __set (string $propertyName, $propertyValue)
 
 __unset (string $propertyName)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait
mixed __call (string $methodName, array $arguments)
 

Protected Member Functions

 extProc_init ()
 
 extProc_RO ($key)
 
 extProc_beforeLinking ($key)
 
 extProc_afterLinking ($key)
 
string extProc_beforeAllWrap ($item, $key)
 
string extProc_finish ()
 
array calcIntExplode ($string)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject
array removeInaccessiblePages (array $pages)
 
array prepareMenuItems ()
 
array prepareMenuItemsForUserSpecificMenu ($specialValue, $sortingField)
 
array prepareMenuItemsForLanguageMenu ($specialValue)
 
array prepareMenuItemsForDirectoryMenu ($specialValue, $sortingField)
 
array prepareMenuItemsForUpdatedMenu ($specialValue, $sortingField)
 
array prepareMenuItemsForKeywordsMenu ($specialValue, $sortingField)
 
array prepareMenuItemsForRootlineMenu ()
 
array prepareMenuItemsForBrowseMenu ($specialValue, $sortingField, $additionalWhere)
 
 analyzeCacheHashRequirements ($queryString)
 
array procesItemStates ($splitCount)
 
array link ($key, $altTarget='', $typeOverride='')
 
array determineOriginalShortcutPage (array $page)
 
 changeLinksForAccessRestrictedPages (&$LD, $page, $mainTarget, $typeOverride)
 
string subMenu ($uid, $objSuffix='')
 
bool isNext ($uid, $MPvar='')
 
bool isActive ($uid, $MPvar='')
 
bool isCurrent ($uid, $MPvar='')
 
bool isSubMenu ($uid)
 
bool isItemState ($kind, $key)
 
array accessKey ($title)
 
mixed userProcess ($mConfKey, $passVar)
 
 setATagParts ()
 
string getPageTitle ($title, $nav_title)
 
string getMPvar ($key)
 
string getDoktypeExcludeWhere ()
 
array getBannedUids ()
 
array menuTypoLink ($page, $oTarget, $no_cache, $script, $overrideArray='', $addParams='', $typeOverride='')
 
array sectionIndex ($altSortField, $pid=null)
 
TypoScriptFrontendController getTypoScriptFrontendController ()
 
 getCurrentLanguageAspect ()
 
TimeTracker getTimeTracker ()
 
TYPO3 CMS Core Cache Frontend FrontendInterface getCache ()
 
TYPO3 CMS Core Cache Frontend FrontendInterface getRuntimeCache ()
 
SiteInterface getCurrentSite ()
 
bool hasParentMenuArr ()
 
 hasParentMenuItemKey ()
 
 hasParentMenuItem ()
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject
TYPO3 CMS Frontend ContentObject ContentObjectRenderer $parent_cObj
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject
 $deprecatedPublicProperties
 
 $deprecatedPublicMethods
 
int $menuNumber = 1
 
int $entryLevel = 0
 
string $spacerIDList = '199'
 
string $doktypeExcludeList = '6'
 
int[] $alwaysActivePIDlist = array( )
 
string $imgNamePrefix = 'img'
 
int $imgNameNotRandom = 0
 
bool $debug = false
 
string $GMENU_fixKey = 'gmenu'
 
string[] $MP_array = array( )
 
array $conf = array( )
 
array $mconf = array( )
 
TYPO3 CMS Core TypoScript TemplateService $tmpl
 
TYPO3 CMS Frontend Page PageRepository $sys_page
 
int $id
 
string $nextActive
 
array[] $menuArr
 
string $hash
 
array $result = array( )
 
array $rL_uidRegister
 
string $INPfixMD5
 
mixed[] $I
 
string $WMresult
 
string $WMfreezePrefix
 
int $WMmenuItems
 
array[] $WMsubmenuObjSuffixes
 
string $WMextraScript
 
ContentObjectRenderer $WMcObj
 
string $alternativeMenuTempArray = ''
 
string $nameAttribute = 'name'
 
bool $useCacheHash = false
 
int null $parentMenuArrItemKey
 
array $parentMenuArr
 

Detailed Description

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

Deprecated:
‪since TYPO3 v9.4, will be removed in TYPO3 v10.0

Definition at line 29 of file GraphicalMenuContentObject.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 31 of file GraphicalMenuContentObject.php.

Member Function Documentation

◆ calcIntExplode()

array TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::calcIntExplode (   $string)
protected

This explodes a comma-list into an array where the values are parsed through ContentObjectRender::calc() and cast to (int)(so you are sure to have integers in the output array) Used to split and calculate min and max values for GMENUs.

Parameters
string$string‪The string with parts in (where each part is evaluated by ->calc())
Returns
‪array And array with evaluated values.
See also
ContentObjectRenderer::calc(), makeGifs()

Definition at line 561 of file GraphicalMenuContentObject.php.

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

◆ extProc_afterLinking()

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

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$key‪Pointer to $this->menuArr[$key] where the current menu element record is found
See also
writeMenu(), AbstractMenuContentObject::subMenu()

Definition at line 515 of file GraphicalMenuContentObject.php.

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

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

◆ extProc_beforeAllWrap()

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

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

Parameters
string$item‪The current content of the menu item, $this->I['theItem'], passed along.
int$key‪Pointer 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']
See also
writeMenu()

Definition at line 533 of file GraphicalMenuContentObject.php.

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

◆ extProc_beforeLinking()

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

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

Parameters
int$key‪Pointer to $this->menuArr[$key] where the current menu element record is found
See also
writeMenu()

Definition at line 502 of file GraphicalMenuContentObject.php.

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

◆ extProc_finish()

string TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::extProc_finish ( )
protected

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

Returns
‪string The total menu content should be returned by this function
See also
writeMenu()

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

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

See also
writeMenu()

Definition at line 482 of file GraphicalMenuContentObject.php.

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

◆ extProc_RO()

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

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

Parameters
int$key‪Pointer 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!
See also
writeMenu()

Definition at line 492 of file GraphicalMenuContentObject.php.

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

◆ findLargestDims()

array 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$conf‪Same configuration array as passed to makeGifs()
int$items‪The number of menu items
array$Hobjs‪Array with "applyTotalH" numbers (unused)
array$Wobjs‪Array with "applyTotalW" numbers (unused)
array$minDim‪Array with "min" x/y
array$maxDim‪Array 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.
See also
makeGifs()

Definition at line 288 of file GraphicalMenuContentObject.php.

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

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

◆ generate()

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

◆ 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$conf‪Array with configuration for each item.
string$resKey‪Type of images: normal ("NO") or rollover ("RO"). Valid values are "NO" and "RO
See also
generate()

Definition at line 86 of file GraphicalMenuContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\$conf, $GLOBALS, TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\calcIntExplode(), TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject\findLargestDims(), TYPO3\CMS\Core\Core\Environment\getPublicPath(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\getTypoScriptFrontendController().

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

◆ writeMenu()

string 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(); )

Reimplemented from TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject.

Definition at line 369 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\Frontend\ContentObject\Menu\AbstractMenuContentObject\setATagParts(), and TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject\userProcess().