JMenu

From Joomla! Documentation

Jump to: navigation, search

JMenu is a class which encapsulates a Joomla menu.

Contents

Availability

Joomla 1.5 Joomla 1.6

Defined in

/libraries/joomla/application/menu.php

Extends

Get and Set Methods

Properties which do not have specific get or set methods listed here can be retrieved or set using the inherited JObject->get method.

Get method Set method Description Property
getActive setActive Current active menu item.
getDefault setDefault Current default menu item.
getInstance Returns a reference to a JMenu object, only creating it if it doesn't already exist.
getItem Returns a menu item given an id.
getItems Returns menu items which have a given value of an attribute.
getMenu Returns an array of JMenu objects.
getParams Returns the parameters for a given menu item in a JParameter object.

Other Methods

Method name Description
authorize Checks the JMenu object authorization against an access control object and optionally an access extension object.
load Loads the menu items.

Importing

jimport( 'joomla.application.menu' );

See also

Personal tools