Menu class
- Depuis
- 1.5
- Note
- Will become abstract in Joomla 4
◆ __construct()
__construct |
( |
|
$options = array() | ) |
|
Class constructor
- Paramètres
-
array | $options | An array of configuration options. |
- Depuis
- 1.5
Références $item, et $options.
◆ authorise()
Method to check Menu object authorization against an access control object and optionally an access extension object
- Paramètres
-
- Renvoie
- boolean
- Depuis
- 1.5
Références $id, et $menu.
◆ getActive()
Get menu item by id.
- Renvoie
- MenuItem|null The item object if an active menu item has been set or null
- Depuis
- 1.5
◆ getDefault()
getDefault |
( |
|
$language = '*' | ) |
|
Get the default item by language code.
- Paramètres
-
string | $language | The language code, default value of * means all. |
- Renvoie
- MenuItem|null The item object or null when not found for given language
- Depuis
- 1.5
Références $language.
◆ getInstance()
static getInstance |
( |
|
$client, |
|
|
|
$options = array() |
|
) |
| |
|
static |
◆ getItem()
Get menu item by id
- Paramètres
-
- Renvoie
- MenuItem|null The item object if the ID exists or null if not found
- Depuis
- 1.5
Références $id, et null.
◆ getItems()
getItems |
( |
|
$attributes, |
|
|
|
$values, |
|
|
|
$firstonly = false |
|
) |
| |
Gets menu items by attribute
- Paramètres
-
mixed | $attributes | The field name(s). |
mixed | $values | The value(s) of the field. If an array, need to match field names each attribute may have multiple values to lookup for. |
boolean | $firstonly | If true, only returns the first item found |
- Renvoie
- MenuItem|MenuItem[] An array of menu item objects or a single object if the $firstonly parameter is true
- Depuis
- 1.5
Références $attributes, $count, $i, $item, et $items.
◆ getMenu()
Getter for the menu array
- Renvoie
- MenuItem[]
- Depuis
- 1.5
◆ getParams()
Gets the parameter object for a certain menu item
- Paramètres
-
- Renvoie
- Registry
- Depuis
- 1.5
Références $id, et $menu.
◆ load()
Loads the menu items
- Renvoie
- array
- Depuis
- 1.5
◆ setActive()
Set the default item by id
- Paramètres
-
- Renvoie
- MenuItem|null The menu item representing the given ID if present or null otherwise
- Depuis
- 1.5
Références $id.
◆ setDefault()
setDefault |
( |
|
$id, |
|
|
|
$language = '*' |
|
) |
| |
Set the default item by id and language code.
- Paramètres
-
integer | $id | The menu item id. |
string | $language | The language code (since 1.6). |
- Renvoie
- boolean True if a menu item with the given ID exists
- Depuis
- 1.5
Références $id, et $language.
◆ $_active
◆ $_default
◆ $_items
◆ $instances
◆ $user
La documentation de cette classe a été générée à partir du fichier suivant :