menu
Packages
Interfaces
Classes
Files

Class: LinksMenuElement

Source Location: /menu/links/links_menu_element.class.php [line 46]

Class Overview

Menu
   |
   --LinksMenuElement
A LinksMenuElement contains a Title, an url, and an image url

Author(s):



Class Details

A LinksMenuElement contains a Title, an url, and an image url

Tags:

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


Class Methods

constructor LinksMenuElement [line 56]

LinksMenuElement LinksMenuElement( $title $title, $url $url, [$image $image = ''], int $id)
Build a LinksMenuElement object

Parameters:

int   $id   The Menu's id in the database
$title   $title  
$url   $url  
$image   $image  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method cache_export [line 170]

string cache_export( )
returns the string to write in the cache file

Tags:

  • return: the string to write in the cache file

Overridden in child classes as:

LinksMenu::cache_export()
LinksMenuLink::cache_export()

Overrides Menu::cache_export() (parent method not documented)
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method cache_export_begin [line 140]

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

Tags:

  • return: the string to write in the cache file at the beginning of the Menu element;
Overrides Menu::cache_export_begin() (parent method not documented)
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method cache_export_end [line 149]

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

Tags:

  • return: the string to write in the cache file at the end of the Menu element
Overrides Menu::cache_export_end() (parent method not documented)
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method display [line 162]

string display( [Template $template = false], [ $mode = LINKS_MENU_ELEMENT__CLASSIC_DISPLAYING])
Displays the menu according to the given template

Displays the menu according to the given template

Tags:

  • return: the HTML code of the menu
  • abstract:

Overridden in child classes as:

LinksMenu::display()
Display the menu
LinksMenuLink::display()
Display the menu

Overrides Menu::display() (Display the menu)

Parameters:

Template   $template   Template according to which the menu must be displayed. If it's not displayed, a default template will be used.
   $mode  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_image [line 121]

string get_image( [bool $compute_relative_url = true])

Tags:

  • return: the $image url

Parameters:

bool   $compute_relative_url   If true, computes relative urls to the website root
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_uid [line 85]

int get_uid( )
Returns the menu uid

Returns the menu uid

Tags:

  • return: the menu uid
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_url [line 100]

string get_url( [bool $compute_relative_url = true])

Tags:

  • return: the link $url

Parameters:

bool   $compute_relative_url   If true, computes relative urls to the website root
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_image [line 68]

void set_image( string $image)

Parameters:

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

method set_url [line 75]

void set_url( string $url)

Parameters:

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

method update_uid [line 92]

void update_uid( )
Update the menu uid

Update the menu uid

Overridden in child classes as:

LinksMenu::update_uid()
Update the menu uid

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

method _assign [line 184]

void _assign( &$template, [int $mode = LINKS_MENU_ELEMENT__CLASSIC_DISPLAYING], Template $template)
Assign tpl vars

Tags:

  • access: protected
Overrides Menu::_assign() (Assign tpl vars)

Parameters:

Template   $template   the template on which we gonna assign vars
int   $mode   in LINKS_MENU_ELEMENT__CLASSIC_DISPLAYING mode, the links menu is displayed. With the LINKS_MENU_ELEMENT__FULL_DISPLAYING mode, the authorization form is also shown.
   &$template  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method _parent [line 215]

void _parent( )
Increase the Menu Depth and set the menu type to its parent one

Tags:

  • access: protected

Overridden in child classes as:

LinksMenu::_parent()
Increase the Menu Depth and set the menu type to its parent one

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


Class Variables

[line 241]   int  $depth  =  0

Tags:

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

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 236]   int  $uid  =  null

Tags:

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

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

Child classes:

LinksMenu
Create a Menu with children. Children could be Menu or LinksMenuLink objects
LinksMenuLink
A Simple menu link

Inherited Methods

Class: Menu

Menu::Menu()
Build a Menu element.
Menu::admin_display()
Display the menu admin gui
Menu::cache_export()
Menu::cache_export_begin()
Menu::cache_export_end()
Menu::display()
Display the menu
Menu::enabled()
Menu::get_auth()
Menu::get_block()
Menu::get_block_position()
Menu::get_id()
Menu::get_title()
Menu::id()
Menu::is_enabled()
Menu::set_auth()
Menu::set_block()
Menu::set_block_position()
Menu::set_title()
Menu::_assign()
Assign tpl vars


Documentation generated on Tue, 28 Jul 2009 22:43:39 +0200 by phpDocumentor 1.4.1