Class JMenu

Description

JMenu class

  • since: 1.5

Located in /libraries/cms/menu/menu.php (line 19)


	
			
Direct descendents
Class Description
 class JMenuAdministrator JMenu class.
 class JMenuSite JMenu class
Variable Summary
 static array $instances
 integer $_active
 integer $_default
 array $_items
Method Summary
 static JMenu getInstance (string $client, [array $options = array()])
 JMenu __construct ([array $options = array()])
 boolean authorise (integer $id)
 object The getActive ()
 object The getDefault ([string $language = '*'])
 mixed getItem (integer $id)
 array getItems (mixed $attributes, mixed $values, [boolean $firstonly = false])
 array getMenu ()
 JRegistry getParams (integer $id)
 array load ()
 mixed setActive (integer $id)
 boolean setDefault (integer $id, [string $language = ''])
Variables
static array $instances = array() (line 52)
  • var: JMenu instances container.
  • since: 1.7
  • access: protected
integer $_active = 0 (line 46)

Identifier of the active menu item

  • deprecated: 4.0 Will convert to $active
  • since: 1.5
  • access: protected
integer $_default = array() (line 37)

Identifier of the default menu item

  • deprecated: 4.0 Will convert to $default
  • since: 1.5
  • access: protected
array $_items = array() (line 28)

Array to hold the menu items

  • deprecated: 4.0 Will convert to $items
  • since: 1.5
  • access: protected
Methods
static getInstance (line 91)

Returns a JMenu object

  • return: A menu object.
  • throws: Exception
  • since: 1.5
  • access: public
static JMenu getInstance (string $client, [array $options = array()])
  • string $client: The name of the client
  • array $options: An associative array of options
Constructor __construct (line 61)

Class constructor

  • since: 1.5
  • access: public
JMenu __construct ([array $options = array()])
  • array $options: An array of configuration options.
authorise (line 342)

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

  • return: True if authorised
  • since: 1.5
  • access: public
boolean authorise (integer $id)
  • integer $id: The menu id
getActive (line 226)

Get menu item by id.

  • return: item object.
  • since: 1.5
  • access: public
object The getActive ()
getDefault (line 181)

Get the default item by language code.

  • return: item object
  • since: 1.5
  • access: public
object The getDefault ([string $language = '*'])
  • string $language: The language code, default value of * means all.

Redefined in descendants as:
getItem (line 138)

Get menu item by id

  • return: The item object, or null if not found
  • since: 1.5
  • access: public
mixed getItem (integer $id)
  • integer $id: The item id
getItems (line 250)

Gets menu items by attribute

  • since: 1.5
  • access: public
array getItems (mixed $attributes, mixed $values, [boolean $firstonly = false])
  • 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

Redefined in descendants as:
getMenu (line 327)

Getter for the menu array

  • since: 1.5
  • access: public
array getMenu ()
getParams (line 308)

Gets the parameter object for a certain menu item

  • return: A JRegistry object
  • since: 1.5
  • access: public
JRegistry getParams (integer $id)
  • integer $id: The item id
load (line 364)

Loads the menu items

  • since: 1.5
  • access: public
array load ()

Redefined in descendants as:
setActive (line 206)

Set the default item by id

  • return: If successful the active item, otherwise null
  • since: 1.5
  • access: public
mixed setActive (integer $id)
  • integer $id: The item id
setDefault (line 160)

Set the default item by id and language code.

  • return: True, if successful
  • since: 1.5
  • access: public
boolean setDefault (integer $id, [string $language = ''])
  • integer $id: The menu item id.
  • string $language: The language cod (since 1.6).

Documentation generated on Tue, 19 Nov 2013 15:07:54 +0100 by phpDocumentor 1.4.3