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

Class: HTML_Menu_ArrayRenderer

Source Location: /HTML_Menu-2.1.1/Menu/ArrayRenderer.php

Class Overview

HTML_Menu_Renderer
   |
   --HTML_Menu_ArrayRenderer

The renderer that creates an array of visible menu entries.


Author(s):

Version:

  • $Revision: 1.2 $

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 57]
The renderer that creates an array of visible menu entries.

The resultant array can be used with e.g. a template engine to produce a completely custom menu look. All menu types except 'rows' are "rendered" into a one-dimensional array of entries: array( 'entry1', ... 'entryN' ) while 'rows' produce a two-dimensional array: array( array('entry 1 for row 1', ..., 'entry M_1 for row 1'), ... array('entry 1 for row N', ..., 'entry M_N for row 1') ) Here entry is array( 'url' => url element of menu entry 'title' => title element of menu entry 'level' => entry's depth in the tree structure 'type' => type of entry, one of HTML_MENU_ENTRY_* constants // if the nodes in the original menu array contained keys other // than 'url', 'title' and 'sub', they will be copied here, too )

  • Author: Alexey Borzov <avb@php.net>
  • Version: $Revision: 1.2 $
  • Access: public


[ Top ]


Method Detail

finishMenu   [line 72]

void finishMenu( $level)


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

Parameters:

   $level   — 

[ Top ]

renderEntry   [line 83]

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


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

Parameters:

   $node   — 
   $level   — 
   $type   — 

[ Top ]

toArray   [line 98]

array toArray( )

Returns the resultant array
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 10:16:40 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.