[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/template/menu/ -> menu.class.php (sommaire)

(pas de description)

Poids: 251 lignes (8 kb)
Inclus ou requis:0 fois
Référencé: 4 fois
Nécessite: 0 fichiers

Définit 1 class

Menu:: (11 méthodes):
  Menu()
  getMenu()
  _findNode()
  findEntry()
  _nodePath()
  _prepareEntryPath()
  entryPath()
  addEntry()
  getEntryAt()
  getEntryBrothers()
  entryExists()


Classe: Menu  - X-Ref

\ingroup Template

Implements support for dealing with xml tree-based menus.

There is more information about the menu API and how to use it here:
http://wiki.lifetype.net/index.php/Menu_api

If you need to get the global instance of the menu, use the Menu::getMenu() singleton method.

New entries can be dynamically added to the menu via the Menu::addEntry() method, and the whole
menu can be rendered by using the MenuRenderer class.

Menu( $menuFile = "")   X-Ref
constructor

param: menuFile
return: nothing

getMenu( $menuFile = "" )   X-Ref
returns a valid instance of the global menu

return: A valid Menu object

_findNode( $node, $nodeId )   X-Ref


findEntry( $nodeId )   X-Ref
finds a node in the tree

param: nodeId
return: Returns an XML_Tree_Node object or null if not found

_nodePath( $node, $nodeId, $stack = Array()   X-Ref


_prepareEntryPath( $entryPath )   X-Ref

return: The cleaned up version of the path

entryPath( $nodeId, $node = null )   X-Ref
returns the path to a menu entry

param: nodeId The id of the node
param: node Optional, a name of the starting node if it's not the root
return: An XML_Tree_Node object or null if not found

addEntry( $entryPath, $entry, $entryOrder = -1 )   X-Ref
adds a menu entry to the menu

param: entryPath
param: entryId
param: entryAttrs
param: entryOrder

getEntryAt( $path )   X-Ref
alias for getNodeAt

param: path

getEntryBrothers( $path )   X-Ref
returns all the "brother" nodes or in other words, all the nodes that have
the same parent

param: path
return: An array of nodes

entryExists( $entryPath )   X-Ref
returns whether there is an entry in the given path or not

param: entryPath
return: True if it exists or false otherwise



Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics