HTML_Menu
[ class tree: HTML_Menu ] [ index: HTML_Menu ] [ all elements ]

Class: HTML_Menu_DirectRenderer

Source Location: /HTML_Menu-2.1.4/Menu/DirectRenderer.php

Class Overview

HTML_Menu_Renderer
   |
   --HTML_Menu_DirectRenderer

The renderer that generates HTML for the menu all by itself.


Author(s):

Version:

  • Release: 2.1.4

Methods


Inherited Variables

Inherited Methods

Class: HTML_Menu_Renderer

HTML_Menu_Renderer::finishLevel()
Finish the tree level (for types 'tree' and 'sitemap')
HTML_Menu_Renderer::finishMenu()
Finish the menu
HTML_Menu_Renderer::finishRow()
Finish the row in the menu
HTML_Menu_Renderer::renderEntry()
Renders the element of the menu
HTML_Menu_Renderer::setMenuType()
Sets the type of the menu being rendered.

Class Details

[line 40]
The renderer that generates HTML for the menu all by itself.

Inspired by HTML_Menu 1.0 code



[ Top ]


Method Detail

finishMenu   [line 93]

void finishMenu( $level)


Overrides HTML_Menu_Renderer::finishMenu() (Finish the menu)

Parameters:

   $level   — 

[ Top ]

finishRow   [line 99]

void finishRow( $level)


Overrides HTML_Menu_Renderer::finishRow() (Finish the row in the menu)

Parameters:

   $level   — 

[ Top ]

renderEntry   [line 105]

void renderEntry( $node, $level, $type)


Overrides HTML_Menu_Renderer::renderEntry() (Renders the element of the menu)

Parameters:

   $node   — 
   $level   — 
   $type   — 

[ Top ]

setEntryTemplate   [line 171]

void setEntryTemplate( mixed $type, [string $template = null])

Sets the template for menu entry.

The template should contain at least the {title} placeholder, can also contain {url} and {indent} placeholders, depending on entry type.

  • Access: public

Parameters:

mixed   $type   —  either type (one of HTML_MENU_ENTRY_* constants) or an array 'type' => 'template'
string   $template   —  template for this entry type if $type is not an array

[ Top ]

setMenuTemplate   [line 142]

void setMenuTemplate( string $prepend, string $append)

Sets the menu template (HTML that wraps around rows)
  • Access: public

Parameters:

string   $prepend   —  this will be prepended to the rows HTML
string   $append   —  this will be appended to the rows HTML

[ Top ]

setRowTemplate   [line 155]

void setRowTemplate( string $prepend, string $append)

Sets the row template (HTML that wraps around entries)
  • Access: public

Parameters:

string   $prepend   —  this will be prepended to the entries HTML
string   $append   —  this will be appended to the entries HTML

[ Top ]

toHtml   [line 129]

string toHtml( )

returns the HTML generated for the menu
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:02:05 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.