
| tslib_menu::start | ( | &$ | tmpl, | |
| &$ | sys_page, | |||
| $ | id, | |||
| $ | conf, | |||
| $ | menuNumber, | |||
| $ | objSuffix = '' | |||
| ) |
The initialization of the object. This just sets some internal variables.
| object | The $GLOBALS['TSFE']->tmpl object | |
| object | The $GLOBALS['TSFE']->sys_page object | |
| integer | A starting point page id. This should probably be blank since the 'entryLevel' value will be used then. | |
| array | The TypoScript configuration for the HMENU cObject | |
| integer | Menu number; 1,2,3. Should probably be '1' | |
| string | Submenu Object suffix. This offers submenus a way to use alternative configuration for specific positions in the menu; By default "1 = TMENU" would use "1." for the TMENU configuration, but if this string is set to eg. "a" then "1a." would be used for configuration instead (while "1 = " is still used for the overall object definition of "TMENU") |
| tslib_menu::makeMenu | ( | ) |
Creates the menu in the internal variables, ready for output. Basically this will read the page records needed and fill in the internal $this->menuArr Based on a hash of this array and some other variables the $this->result variable will be loaded either from cache OR by calling the generate() method of the class to create the menu for real.
| tslib_menu::includeMakeMenu | ( | $ | conf, | |
| $ | altSortField | |||
| ) |
Includes the PHP script defined for the HMENU special type "userdefined". This script is supposed to populate the array $menuItemsArray with a set of page records comprising the menu. The "userdefined" type is deprecated since "userfunction" has arrived since and is a better choice for many reasons (like using classes/functions for rendering the menu)
| array | TypoScript parameters for "special.". In particular the property "file" is reserved and specifies the file to include. Seems like any other property can be used freely by the script. | |
| string | The sorting field. Can be used from the script in the $incFile. |
| tslib_menu::filterMenuPages | ( | &$ | data, | |
| $ | banUidArray, | |||
| $ | spacer | |||
| ) |
Checks if a page is OK to include in the final menu item array. Pages can be excluded if the doktype is wrong, if they are hidden in navigation, have a uid in the list of banned uids etc.
| array | Array of menu items | |
| array | Array of page uids which are to be excluded | |
| boolean | If set, then the page is a spacer. |
| tslib_menu::procesItemStates | ( | $ | splitCount | ) |
Generating the per-menu-item configuration arrays based on the settings for item states (NO, RO, ACT, CUR etc) set in ->mconf (config for the current menu object) Basically it will produce an individual array for each menu item based on the item states. BUT in addition the "optionSplit" syntax for the values is ALSO evaluated here so that all property-values are "option-splitted" and the output will thus be resolved. Is called from the "generate" functions in the extension classes. The function is processor intensive due to the option split feature in particular. But since the generate function is not always called (since the ->result array may be cached, see makeMenu) it doesn't hurt so badly.
| integer | Number of menu items in the menu |
| tslib_menu::link | ( | $ | key, | |
| $ | altTarget = '', |
|||
| $ | typeOverride = '' | |||
| ) |
Creates the URL, target and onclick values for the menu item link. Returns them in an array as key/value pairs for -tag attributes This function doesn't care about the url, because if we let the url be redirected, it will be logged in the stat!!!
| integer | Pointer to a key in the $this->menuArr array where the value for that key represents the menu item we are linking to (page record) | |
| string | Alternative target | |
| integer | Alternative type |
| tslib_menu::changeLinksForAccessRestrictedPages | ( | &$ | LD, | |
| $ | page, | |||
| $ | mainTarget, | |||
| $ | typeOverride | |||
| ) |
Will change $LD (passed by reference) if the page is access restricted
| array | $LD, the array from the linkData() function | |
| array | Page array | |
| string | Main target value | |
| string | Type number override if any |
| tslib_menu::subMenu | ( | $ | uid, | |
| $ | objSuffix = '' | |||
| ) |
Creates a submenu level to the current level - if configured for.
| integer | Page id of the current page for which a submenu MAY be produced (if conditions are met) | |
| string | Object prefix, see ->start() |
| tslib_menu::isNext | ( | $ | uid, | |
| $ | MPvar = '' | |||
| ) |
Returns true if the page with UID $uid is the NEXT page in root line (which means a submenu should be drawn)
| integer | Page uid to evaluate. | |
| string | MPvar for the current position of item. |
| tslib_menu::isActive | ( | $ | uid, | |
| $ | MPvar = '' | |||
| ) |
Returns true if the page with UID $uid is active (in the current rootline)
| integer | Page uid to evaluate. | |
| string | MPvar for the current position of item. |
| tslib_menu::isCurrent | ( | $ | uid, | |
| $ | MPvar = '' | |||
| ) |
Returns true if the page with UID $uid is the CURRENT page (equals $GLOBALS['TSFE']->id)
| integer | Page uid to evaluate. | |
| string | MPvar for the current position of item. |
| tslib_menu::isSubMenu | ( | $ | uid | ) |
Returns true if there is a submenu with items for the page id, $uid Used by the item states "IFSUB", "ACTIFSUB" and "CURIFSUB" to check if there is a submenu
| integer | Page uid for which to search for a submenu |
| tslib_menu::isItemState | ( | $ | kind, | |
| $ | key | |||
| ) |
Used by procesItemStates() to evaluate if a menu item (identified by $key) is in a certain state.
| string | The item state to evaluate (SPC, IFSUB, ACT etc... but no xxxRO states of course) | |
| integer | Key pointing to menu item from ->menuArr |
| tslib_menu::accessKey | ( | $ | title | ) |
Creates an access-key for a GMENU menu item based on the menu item titles first letter
| string | Menu item title. |
| tslib_menu::userProcess | ( | $ | mConfKey, | |
| $ | passVar | |||
| ) |
Calls a user function for processing of internal data. Used for the properties "IProcFunc" and "itemArrayProcFunc"
| string | Key pointing for the property in the current ->mconf array holding possibly parameters to pass along to the function/method. Currently the keys used are "IProcFunc" and "itemArrayProcFunc". | |
| mixed | A variable to pass to the user function and which should be returned again from the user function. The idea is that the user function modifies this variable according to what you want to achieve and then returns it. For "itemArrayProcFunc" this variable is $this->menuArr, for "IProcFunc" it is $this->I |
| tslib_menu::setATagParts | ( | ) |
Creates the tag parts for the current item (in $this->I, [A1] and [A2]) based on other information in this array (like $this->I['linkHREF'])
| tslib_menu::getPageTitle | ( | $ | title, | |
| $ | nav_title | |||
| ) |
Returns the title for the navigation
| string | The current page title | |
| string | The current value of the navigation title |
| tslib_menu::getMPvar | ( | $ | key | ) |
Return MPvar string for entry $key in ->menuArr
| integer | Pointer to element in ->menuArr | |
| string | Implode token. |
| tslib_menu::getDoktypeExcludeWhere | ( | ) |
Returns where clause part to exclude 'not in menu' pages
| tslib_menu::getBannedUids | ( | ) |
Returns an array of banned UIDs (from excludeUidList)
| tslib_menu::$menuNumber = 1 |
| tslib_menu::$entryLevel = 0 |
| tslib_menu::$spacerIDList = '199' |
| tslib_menu::$doktypeExcludeList = '5,6' |
| tslib_menu::$alwaysActivePIDlist = array() |
| tslib_menu::$imgNamePrefix = 'img' |
| tslib_menu::$imgNameNotRandom = 0 |
| tslib_menu::$debug = 0 |
| tslib_menu::$parent_cObj |
| tslib_menu::$GMENU_fixKey = 'gmenu' |
Réimplémentée dans tslib_gmenu_foldout, tslib_gmenu_layers, et tslib_tmenu_layers.
| tslib_menu::$MP_array = array() |
| tslib_menu::$conf = Array() |
| tslib_menu::$mconf = Array() |
| tslib_menu::$tmpl |
| tslib_menu::$sys_page |
| tslib_menu::$id |
| tslib_menu::$nextActive |
| tslib_menu::$menuArr |
| tslib_menu::$hash |
| tslib_menu::$result = Array() |
| tslib_menu::$rL_uidRegister = '' |
| tslib_menu::$INPfixMD5 |
| tslib_menu::$I |
| tslib_menu::$WMresult |
| tslib_menu::$WMfreezePrefix |
| tslib_menu::$WMmenuItems |
| tslib_menu::$WMsubmenuObjSuffixes |
| tslib_menu::$WMextraScript |
Réimplémentée dans tslib_gmenu_layers, et tslib_tmenu_layers.
| tslib_menu::$alternativeMenuTempArray = '' |
| tslib_menu::$nameAttribute = 'name' |
1.5.3