Joomla CMS  3.9.25 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.9.25 et du framework Joomla Platform intégré
Référence de la classe AbstractMenu
+ Graphe d'héritage de AbstractMenu:

Fonctions membres publiques

 __construct ($options=array())
 
 getItem ($id)
 
 setDefault ($id, $language=' *')
 
 getDefault ($language=' *')
 
 setActive ($id)
 
 getActive ()
 
 getItems ($attributes, $values, $firstonly=false)
 
 getParams ($id)
 
 getMenu ()
 
 authorise ($id)
 
 load ()
 

Fonctions membres publiques statiques

static getInstance ($client, $options=array())
 

Attributs protégés

 $_items = array()
 
 $_default = array()
 
 $_active = 0
 
 $user
 

Attributs protégés statiques

static $instances = array()
 

Description détaillée

Menu class

Depuis
1.5
Note
Will become abstract in Joomla 4

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $options = array())

Class constructor

Paramètres
array$optionsAn array of configuration options.
Depuis
1.5

Références $item, et $options.

Documentation des fonctions membres

◆ authorise()

authorise (   $id)

Method to check Menu object authorization against an access control object and optionally an access extension object

Paramètres
integer$idThe menu id
Renvoie
boolean
Depuis
1.5

Références $id, et $menu.

◆ getActive()

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$languageThe 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

Returns a Menu object

Paramètres
string$clientThe name of the client
array$optionsAn associative array of options
Renvoie
AbstractMenu A menu object.
Depuis
1.5
Exceptions

Références $client, $info, $options, $path, et JLoader\register().

◆ getItem()

getItem (   $id)

Get menu item by id

Paramètres
integer$idThe item id
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$attributesThe field name(s).
mixed$valuesThe value(s) of the field. If an array, need to match field names each attribute may have multiple values to lookup for.
boolean$firstonlyIf 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()

getMenu ( )

Getter for the menu array

Renvoie
MenuItem[]
Depuis
1.5

◆ getParams()

getParams (   $id)

Gets the parameter object for a certain menu item

Paramètres
integer$idThe item id
Renvoie
Registry
Depuis
1.5

Références $id, et $menu.

◆ load()

load ( )

Loads the menu items

Renvoie
array
Depuis
1.5

◆ setActive()

setActive (   $id)

Set the default item by id

Paramètres
integer$idThe item id
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$idThe menu item id.
string$languageThe 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.

Documentation des champs

◆ $_active

$_active = 0
protected

◆ $_default

$_default = array()
protected

◆ $_items

$_items = array()
protected

◆ $instances

$instances = array()
staticprotected

◆ $user

$user
protected

La documentation de cette classe a été générée à partir du fichier suivant :