|
static | getLinkKey ($request) |
|
static | getMenuTypes ($clientId=0) |
|
static | getMenuLinks ($menuType=null, $parentId=0, $mode=0, $published=array(), $languages=array(), $clientId=0) |
|
static | getAssociations ($pk) |
|
static | getMenuItems ($menutype, $enabledOnly=false, $exclude=array()) |
|
static | installPreset ($preset, $menutype) |
|
static | addPreset ($name, $title, $path, $replace=true) |
|
static | getPresets () |
|
static | loadPreset ($name, $fallback=true, $parent=null) |
|
static | resolveAlias (&$item) |
|
static | preprocess ($item) |
|
static | addSubmenu ($vName) |
|
static | countRelations (&$items, $config) |
|
static | getActions ($component='', $section='', $id=0) |
|
static | getCurrentLanguage ($detectBrowser=true) |
|
static | getLanguageId ($langCode) |
|
Menus component helper.
- Depuis
- 1.6
◆ addPreset()
static addPreset |
( |
|
$name, |
|
|
|
$title, |
|
|
|
$path, |
|
|
|
$replace = true |
|
) |
| |
|
static |
Add a custom preset externally via plugin or any other means. WARNING: Presets with same name will replace previously added preset except Joomla's default preset (joomla)
- Paramètres
-
string | $name | The unique identifier for the preset. |
string | $title | The display label for the preset. |
string | $path | The path to the preset file. |
bool | $replace | Whether to replace the preset with the same name if any (except 'joomla'). |
- Renvoie
- void
- Depuis
- 4.0.0
Références $name, $path, $title, et null.
◆ getAssociations()
static getAssociations |
( |
|
$pk | ) |
|
|
static |
◆ getLinkKey()
static getLinkKey |
( |
|
$request | ) |
|
|
static |
◆ getMenuItems()
static getMenuItems |
( |
|
$menutype, |
|
|
|
$enabledOnly = false , |
|
|
|
$exclude = array() |
|
) |
| |
|
static |
Load the menu items from database for the given menutype
- Paramètres
-
string | $menutype | The selected menu type |
boolean | $enabledOnly | Whether to load only enabled/published menu items. |
| int[] | $exclude The menu items to exclude from the list |
- Renvoie
- AdministratorMenuItem A root node with the menu items as children
- Depuis
- 4.0.0
Références $db, $item, $menutype, $query, $root, Text\_(), class, Factory\getApplication(), Factory\getContainer(), null, et ParameterType\STRING.
Référencé par XmlView\display(), CssMenu\load(), Menu\preprocess(), et CssMenu\preprocess().
◆ getMenuLinks()
static getMenuLinks |
( |
|
$menuType = null , |
|
|
|
$parentId = 0 , |
|
|
|
$mode = 0 , |
|
|
|
$published = array() , |
|
|
|
$languages = array() , |
|
|
|
$clientId = 0 |
|
) |
| |
|
static |
Get a list of menu links for one or all menus.
- Paramètres
-
string | $menuType | An option menu to filter the list on, otherwise all menu with given client id links are returned as a grouped array. |
integer | $parentId | An optional parent ID to pivot results around. |
integer | $mode | An optional mode. If parent ID is set and mode=2, the parent and children are excluded from the list. |
array | $published | An optional array of states |
array | $languages | Optional array of specify which languages we want to filter |
int | $clientId | Optional client id - viz 0 = site, 1 = administrator, can be NULL for all (used only if menutype not given) |
- Renvoie
- array|boolean
- Depuis
- 1.6
Références $clientId, $db, $languages, $link, $menuType, $menuTypes, $mode, $published, $query, $type, elseif, Factory\getApplication(), Factory\getDbo(), ParameterType\INTEGER, Multilanguage\isEnabled(), null, et ParameterType\STRING.
Référencé par MenuitemField\getGroups(), et MenuItemByTypeField\getGroups().
◆ getMenuTypes()
static getMenuTypes |
( |
|
$clientId = 0 | ) |
|
|
static |
◆ getPresets()
Get a list of available presets.
- Renvoie
- []
- Depuis
- 4.0.0
Références $app, $component, $folder, $lang, $name, $title, Folder\exists(), Folder\files(), Factory\getApplication(), ComponentHelper\getComponents(), JPATH_ADMINISTRATOR, JPATH_THEMES, null, et File\stripExt().
Référencé par MenuPresetField\getOptions().
◆ installPreset()
static installPreset |
( |
|
$preset, |
|
|
|
$menutype |
|
) |
| |
|
static |
Method to install a preset menu into database and link them to the given menutype
- Paramètres
-
string | $preset | The preset name |
string | $menutype | The target menutype |
- Renvoie
- void
- Exceptions
-
Références $menutype, $root, et Text\_().
◆ loadPreset()
static loadPreset |
( |
|
$name, |
|
|
|
$fallback = true , |
|
|
|
$parent = null |
|
) |
| |
|
static |
Load the menu items from a preset file into a hierarchical list of objects
- Paramètres
-
string | $name | The preset name |
bool | $fallback | Fallback to default (joomla) preset if the specified one could not be loaded? |
AdministratorMenuItem | $parent | Root node of the menu |
- Renvoie
- AdministratorMenuItem
- Depuis
- 4.0.0
Références $name, $xml, elseif, null, et path.
Référencé par CssMenu\load().
◆ loadXml()
static loadXml |
( |
|
$elements, |
|
|
|
$parent, |
|
|
|
$replace = array() |
|
) |
| |
|
staticprotected |
Load a menu tree from an XML file
- Paramètres
-
Following is a repeatable group based on simple database query. This requires sql_* attributes (sql_select and sql_from are required) The values can be used like - "{sql:columnName}" in any attribute of repeated elements. The repeated elements are place inside this xml node but they will be populated in the same level in the rendered menu
Références $db, $item, $query, $result, $results, et Factory\getDbo().
◆ parseXmlNode()
static parseXmlNode |
( |
|
$node, |
|
|
|
$replace = array() |
|
) |
| |
|
staticprotected |
Create a menu item node from an xml element
- Paramètres
-
\SimpleXMLElement | $node | A menuitem element from preset xml |
| string[] | $replace The values to substitute in the title, link and element texts |
- Renvoie
- Depuis
- 4.0.0
Références $item, $params, $val, et null.
◆ preprocess()
static preprocess |
( |
|
$item | ) |
|
|
static |
Parse the flat list of menu items and prepare the hierarchy of them using parent-child relationship.
- Paramètres
-
AdministratorMenuItem | $item | Menu item to preprocess |
- Renvoie
- void
- Depuis
- 4.0.0
Références $item, et null.
◆ resolveAlias()
static resolveAlias |
( |
& |
$item | ) |
|
|
static |
◆ $_filter
$_filter = array('option', 'view', 'layout') |
|
staticprotected |
◆ $presets
La documentation de cette classe a été générée à partir du fichier suivant :