menu
Packages
Interfaces
Classes
Files

Class: Menu

Source Location: /menu/menu.class.php [line 52]

Class Overview


This class represents a menu element and is used to build any kind of menu

Author(s):



Class Details

This class represents a menu element and is used to build any kind of menu

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

constructor Menu [line 60]

Menu Menu( string $title, int $id)
Build a Menu element.

Parameters:

string   $title   the Menu title
int   $id   its id in the database
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method admin_display [line 130]

string admin_display( )
Display the menu admin gui

Tags:

  • return: the menu parsed in xHTML
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method cache_export [line 140]

string cache_export( )

Tags:

  • return: the string the string to write in the cache file
  • abstract:

Overridden in child classes as:

LinksMenuElement::cache_export()
returns the string to write in the cache file
LinksMenu::cache_export()
LinksMenuLink::cache_export()
MiniMenu::cache_export()
ModuleMiniMenu::cache_export()
FeedMenu::cache_export()
ContentMenu::cache_export()

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method cache_export_begin [line 145]

string cache_export_begin( )

Tags:

  • return: the string to write in the cache file at the beginning of the Menu element;

Overridden in child classes as:

LinksMenuElement::cache_export_begin()
returns the string to write in the cache file at the beginning of the Menu element

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method cache_export_end [line 155]

string cache_export_end( )

Tags:

  • return: the string to write in the cache file at the end of the Menu element

Overridden in child classes as:

LinksMenuElement::cache_export_end()
returns the string to write in the cache file at the end of the Menu element

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method display [line 120]

string display( [ $tpl = false], Template $template)
Display the menu

Tags:

  • return: the menu parsed in xHTML
  • abstract:

Overridden in child classes as:

LinksMenuElement::display()
Displays the menu according to the given template
LinksMenu::display()
Display the menu
LinksMenuLink::display()
Display the menu
FeedMenu::display()
ContentMenu::display()
Display the content menu.

Parameters:

Template   $template   the template to use
   $tpl  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method enabled [line 77]

void enabled( [bool $enabled = MENU_ENABLED])

Parameters:

bool   $enabled   Enable or not the Menu
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_auth [line 95]

array get_auth( )

Tags:

  • return: the authorization array $auth
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_block [line 103]

int get_block( )

Tags:

  • return: the Menu $block position
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_block_position [line 107]

int get_block_position( )

Tags:

  • return: the Menu $position
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_id [line 99]

int get_id( )

Tags:

  • return: the $id of the menu in the database
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_title [line 91]

string get_title( )

Tags:

  • return: the link $title

Overridden in child classes as:

ModuleMiniMenu::get_title()

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method id [line 165]

void id( int $id)

Parameters:

int   $id   Set the Menu database id
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method is_enabled [line 111]

bool is_enabled( )

Tags:

  • return: true if the Menu is enabled, false otherwise
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_auth [line 73]

void set_auth( $auth, array $url)

Parameters:

array   $url   the authorisation array to set
   $auth  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_block [line 81]

int set_block( $block)

Tags:

  • return: the Menu $block position

Parameters:

   $block  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_block_position [line 85]

void set_block_position( int $position)

Parameters:

int   $position   the Menu position to set
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_title [line 69]

void set_title( $title, string $image)

Parameters:

string   $image   the value to set
   $title  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method _assign [line 174]

void _assign( &$template, Template $template)
Assign tpl vars

Tags:

  • access: protected

Overridden in child classes as:

LinksMenuElement::_assign()
Assign tpl vars

Parameters:

Template   $template   the template on which we gonna assign vars
   &$template  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 205]   int[string]  $auth  =  null

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 215]   int  $block  =  BLOCK_POSITION__NOT_ENABLED

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 210]   bool  $enabled  =  MENU_NOT_ENABLED

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 195]   int  $id  =  0

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 220]   int  $position  =  -1

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 200]   string  $title  =  ''

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
Documentation generated on Tue, 28 Jul 2009 22:43:39 +0200 by phpDocumentor 1.4.1