Difference between revisions of "JMenu"
From Joomla! Documentation
(Updated to r1448:247ba8d88526) |
m (preparing for archive only) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
=={{JVer|11.1}} JMenu== | =={{JVer|11.1}} JMenu== | ||
===Description=== | ===Description=== | ||
− | + | ||
− | + | ||
− | |||
− | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
Line 14: | Line 12: | ||
|- | |- | ||
|public | |public | ||
− | |[[JMenu::__construct | + | |[[API17:JMenu::__construct|__construct]] |
|Class constructor. | |Class constructor. | ||
|- | |- | ||
|public | |public | ||
− | |[[JMenu::authorise | + | |[[API17:JMenu::authorise|authorise]] |
|Method to check object authorization against an access control object and optionally an access extension object. | |Method to check object authorization against an access control object and optionally an access extension object. | ||
|- | |- | ||
|public | |public | ||
− | |[[JMenu::getActive | + | |[[API17:JMenu::getActive|getActive]] |
|Get menu item by id. | |Get menu item by id. | ||
|- | |- | ||
|public | |public | ||
− | |[[JMenu::getDefault | + | |[[API17:JMenu::getDefault|getDefault]] |
|Get menu item by id. | |Get menu item by id. | ||
|- | |- | ||
|public | |public | ||
− | |[[JMenu::getItem | + | |[[API17:JMenu::getItem|getItem]] |
|Get menu item by id. | |Get menu item by id. | ||
|- | |- | ||
|public | |public | ||
− | |[[JMenu::getItems | + | |[[API17:JMenu::getItems|getItems]] |
|Gets menu items by attribute. | |Gets menu items by attribute. | ||
|- | |- | ||
|public | |public | ||
− | |[[JMenu::getMenu | + | |[[API17:JMenu::getMenu|getMenu]] |
|Getter for the menu array. | |Getter for the menu array. | ||
|- | |- | ||
|public | |public | ||
− | |[[JMenu::getParams | + | |[[API17:JMenu::getParams|getParams]] |
|Gets the parameter object for a certain menu item. | |Gets the parameter object for a certain menu item. | ||
|- | |- | ||
|public | |public | ||
− | |[[JMenu::load | + | |[[API17:JMenu::load|load]] |
|Loads the menu items. | |Loads the menu items. | ||
|- | |- | ||
|public | |public | ||
− | |[[JMenu::setActive | + | |[[API17:JMenu::setActive|setActive]] |
|Set the default item by id. | |Set the default item by id. | ||
|- | |- | ||
|public | |public | ||
− | |[[JMenu::setDefault | + | |[[API17:JMenu::setDefault|setDefault]] |
|Set the default item by id and language code. | |Set the default item by id and language code. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JMenu::getInstance | + | |[[API17:JMenu::getInstance|getInstance]] |
|Returns a object. | |Returns a object. | ||
|- | |- | ||
|} | |} | ||
* '''Defined in''' libraries/joomla/application/menu.php | * '''Defined in''' libraries/joomla/application/menu.php | ||
− | * '''Extends''' [[JObject | + | * '''Extends''' [[API17:JObject|JObject]] |
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.application.menu' );</source> | <source lang="php">jimport( 'joomla.application.menu' );</source> | ||
===See also=== | ===See also=== | ||
* {{JVer|11.1}} '''JMenu source code''' on [[jplatform:application/menu.php|BitBucket]] | * {{JVer|11.1}} '''JMenu source code''' on [[jplatform:application/menu.php|BitBucket]] | ||
− | * {{JVer|11.1}} Subpackage [[Subpackage Application | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage Application|Application]] |
− | * [[JMenu|Other versions of JMenu]] | + | * [[API17:JMenu|Other versions of JMenu]] |
− | + | ||
− | + | ||
− | |||
− | |||
===User contributed notes=== | ===User contributed notes=== | ||
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JMenu | category=JMenu | ||
− | + | namespace=CodeExample | |
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
Line 85: | Line 81: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | <noinclude> | + | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> |
Latest revision as of 22:26, 24 March 2017
The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
JMenu[edit]
Description[edit]
Methods[edit]
Visibility | Method name | Description |
---|---|---|
public | __construct | Class constructor. |
public | authorise | Method to check object authorization against an access control object and optionally an access extension object. |
public | getActive | Get menu item by id. |
public | getDefault | Get menu item by id. |
public | getItem | Get menu item by id. |
public | getItems | Gets menu items by attribute. |
public | getMenu | Getter for the menu array. |
public | getParams | Gets the parameter object for a certain menu item. |
public | load | Loads the menu items. |
public | setActive | Set the default item by id. |
public | setDefault | Set the default item by id and language code. |
public static | getInstance | Returns a object. |
- Defined in libraries/joomla/application/menu.php
- Extends JObject
Importing[edit]
jimport( 'joomla.application.menu' );
See also[edit]
- JMenu source code on BitBucket
- Subpackage Application
- Other versions of JMenu
User contributed notes[edit]
Code Examples[edit]