Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class JMenu

Description

JMenu class

Located in /joomla/application/menu.php (line 27)

Class JObject   (Subpackage Base)

Class JMenu   (Subpackage Application)
Method Summary
Constructor boolean __construct ()
Method boolean authorize (integer $id, [integer $accessid = 0])
Method object The &getActive ()
Method object The &getDefault ()
Method mixed &getItem (int $id)
Method array getItems (string $attribute, string $value, [boolean $firstonly = false])
Method array getMenu (string $name)
Method object A &getParams (int $id)
Method True, setActive (int $id)
Method True, setDefault (int $id)
Method array _load ()
Methods
Constructor __construct (line 60)

Class constructor

  • return: True on success
  • access: public
boolean __construct ()

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
authorize (line 241)

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

  • return: True if authorized
  • access: public
boolean authorize (integer $id, integer $accessid)
  • integer $id: The menu id
  • integer $accessid: The users access identifier
getActive (line 167)

Get menu item by id

  • return: item object
  • access: public
object The &getActive ()
getDefault (line 137)

Get menu item by id

  • return: item object
  • access: public
object The &getDefault ()
getInstance (line 85)

Returns a reference to the global JMenu object, only creating it if it doesn't already exist.

This method must be invoked as:

  $menu = &JMenu::getInstance();

  • return: The Menu object.
  • since: 1.5
  • access: public
JMenu &getInstance ()
getItem (line 103)

Get menu item by id

  • return: The item object, or null if not found
  • access: public
mixed &getItem (int $id)
  • int $id: The item id
getItems (line 182)

Gets menu items by attribute

  • access: public
array getItems (string $attribute, string $value, [boolean $firstonly = false])
  • string $attribute: The field name
  • string $value: The value of the field
  • boolean $firstonly: If true, only returns the first item found
getMenu (line 228)

Getter for the menu array

  • access: public
array getMenu (string $name)
  • string $name: The menu name
getParams (line 210)

Gets the parameter object for a certain menu item

  • return: JParameter object
  • access: public
object A &getParams (int $id)
  • int $id: The item id
setActive (line 150)

Set the default item by id

  • return: if succesfull
  • access: public
True, setActive (int $id)
  • int $id: The item id
setDefault (line 120)

Set the default item by id

  • return: if succesfull
  • access: public
True, setDefault (int $id)
  • int $id: The item id
_load (line 253)

Loads the entire menu table into memory

  • access: protected
array _load ()

Inherited Methods

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getPublicProperties()
 JObject::set()
 JObject::toString()

Documentation generated on Mon, 05 Mar 2007 21:10:34 +0000 by phpDocumentor 1.3.1