com.lokorin.lokorin.lib
[ class tree: com.lokorin.lokorin.lib ] [ index: com.lokorin.lokorin.lib ] [ all elements ]

Class: MenuItem

Source Location: /_includes/lib_menu.php

Class Overview

TableEntry
   |
   --MenuItem

Describes an item in a menu. An menu item has a name and are ordered in a tree where all nodes except the root are menu items. An menu item may have any number of children.


Author(s):

  • Andreas Launila

Variables

Methods


Inherited Variables

Inherited Methods

Class: TableEntry

TableEntry::__construct()
Constructor for TableEntry.
TableEntry::getId()
Gets the unique identifier for the table entry.
TableEntry::readRow()
Processes the contents of a retrieved row that describes the entry.

Class Details

[line 113]
Describes an item in a menu. An menu item has a name and are ordered in a tree where all nodes except the root are menu items. An menu item may have any number of children.



Tags:

author:  Andreas Launila


[ Top ]


Class Variables

$name =

[line 118]

The name that describes and is displayed for the menu item.



Tags:

access:  private

Type:   string


[ Top ]

$path =

[line 124]

An optional path that the menu item leads to. It's either an aboslute url or one relative to the root path.



Tags:

access:  private

Type:   string


[ Top ]



Class Methods


constructor __construct [line 130]

MenuItem __construct( integer $id)

Creator for MenuItem.



Tags:

access:  public


Overrides TableEntry::__construct() (Constructor for TableEntry.)

Parameters:

integer   $id   The unique identifier for the menu item.

[ Top ]

method getAsHtml [line 171]

string getAsHtml( )

Gets the menu item as XHTML compliant code. This function also includes the children of the menu item (if there are any).



Tags:

return:  XHTML compliant code representing the menu item. The menu item is represented as a hypertext link in a list item containing a list with all children.
access:  public


[ Top ]

method getAsSitemapEntry [line 237]

string getAsSitemapEntry( )

Gets the menu as a sitemap entry.



Tags:

return:  A well-formed XML url entry as specified by the google sitemap schema.
access:  public


[ Top ]

method getChildren [line 150]

array getChildren( )

Gets all children of the menu item in alphabetical order based on their names.



Tags:

return:  An array of MenuItem instance where each instance represents a child. The array may be empty if no children were found.
access:  public


[ Top ]

method getName [line 228]

string getName( )

Gets the name of the menu item.



Tags:

return:  A name that describes the menu item.
access:  public


[ Top ]

method readRow [line 138]

void readRow( mixed $row)



Tags:

access:  protected
see:  com.lokorin.lokorin.includes.TableEntry.readRow($row)


Overrides TableEntry::readRow() (Processes the contents of a retrieved row that describes the entry.)

[ Top ]


Documentation generated on Sun, 16 Apr 2006 21:03:38 +0200 by phpDocumentor 1.3.0RC4