Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2008 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5. Some parts of this website may be subject to other licenses.

 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 ([ $options = array()])
Method boolean authorize (integer $id, [integer $accessid = 0])
Method object The &getActive ()
Method object The &getDefault ()
Method JMenu &getInstance (string $client, [array $options = array()])
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)
Abstract method array load ()
Method If &setActive (int $id)
Method True, setDefault (int $id)
Variables

Inherited Variables

Inherited from JObject

Variable JObject::$_errors
Methods
Constructor __construct (line 60)

Class constructor

  • return: True on success
  • access: public
boolean __construct ([ $options = array()])
  • $options

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

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 193)

Get menu item by id

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

Get menu item by id

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

Returns a reference to a JMenu object

This method must be invoked as:

  $menu = &JSite::getMenu();

  • return: A menu object.
  • since: 1.5
  • access: public
JMenu &getInstance (string $client, [array $options = array()])
  • string $client: The name of the client
  • array $options: An associative array of options
getItem (line 126)

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 213)

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 260)

Getter for the menu array

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

Gets the parameter object for a certain menu item

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

Loads the menu items

  • access: public
  • abstract:
array load ()
setActive (line 173)

Set the default item by id

  • return: successfull the active item, otherwise null
  • access: public
If &setActive (int $id)
  • int $id: The item id
setDefault (line 143)

Set the default item by id

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

Inherited Methods

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::getPublicProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::toString()

Documentation generated on Tue, 29 Jan 2008 18:48:20 +0000 by phpDocumentor 1.3.1