Menu Helper utility
- Depuis
- 3.8.0
- Obsolète:
- 4.0
◆ __construct()
◆ 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
- 3.8.0
- Obsolète:
- 4.0 Use Joomla
Références $name, $path, $title, et null.
◆ createLevels()
static createLevels |
( |
|
$menuItems | ) |
|
|
static |
Parse the flat list of menu items and prepare the hierarchy of them using parent-child relationship.
- Paramètres
-
Références $i, $item, et null.
◆ getPresets()
◆ loadPreset()
static loadPreset |
( |
|
$name, |
|
|
|
$fallback = true |
|
) |
| |
|
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? |
- Renvoie
- []
- Depuis
- 3.8.0
- Obsolète:
- 4.0 Use Joomla
Références $items, $name, elseif, et null.
◆ loadXml()
static loadXml |
( |
|
$elements, |
|
|
& |
$items, |
|
|
|
$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, $hidden, $item, $items, $query, et $results.
◆ 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
- 3.8.0
- Obsolète:
- 4.0 Use Joomla
Références $item, et null.
◆ resolveAlias()
static resolveAlias |
( |
& |
$item | ) |
|
|
static |
Method to resolve the menu item alias type menu item
- Paramètres
-
\stdClass | &$item | The alias object |
- Renvoie
- void
- Depuis
- 3.8.0
- Obsolète:
- 4.0 Use Joomla
Références $db, $item, $params, et $query.
◆ $presets
La documentation de cette classe a été générée à partir du fichier suivant :