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

Class: HTML_Menu_DirectTreeRenderer

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

Class Overview

HTML_Menu_Renderer
   |
   --HTML_Menu_DirectTreeRenderer

The 'direct' renderer for 'tree' and 'sitemap' menu types where level is represented by tags nesting.


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 'direct' renderer for 'tree' and 'sitemap' menu types where level is represented by tags nesting.

Thanks to Uwe Mindrup for the idea and initial implementation.



[ Top ]


Method Detail

finishLevel   [line 101]

void finishLevel( $level)


Overrides HTML_Menu_Renderer::finishLevel() (Finish the tree level (for types 'tree' and 'sitemap'))

Parameters:

   $level   — 

[ Top ]

renderEntry   [line 114]

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


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

Parameters:

   $node   — 
   $level   — 
   $type   — 

[ Top ]

setEntryTemplate   [line 179]

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 ]

setItemTemplate   [line 150]

void setItemTemplate( string $prepend, string $append)

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

Parameters:

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

[ Top ]

setLevelTemplate   [line 163]

void setLevelTemplate( string $prepend, string $append)

Sets the level template (HTML that wraps around the submenu)
  • Access: public

Parameters:

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

[ Top ]

setMenuType   [line 90]

void setMenuType( $menuType)


Overrides HTML_Menu_Renderer::setMenuType() (Sets the type of the menu being rendered.)

Parameters:

   $menuType   — 

[ Top ]

toHtml   [line 137]

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.