Class Horde_Tree_Html
The Horde_Tree_Html:: class provides HTML specific rendering functions.
Copyright 2003-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.
-
Horde_Tree_Base
implements
Countable
-
Horde_Tree_Html
Methods summary
public
|
#
__construct( string $name, array $params = array() )
Constructor.
Parameters
- $name
- The name of this tree instance.
- $params
- Additional parameters:
<pre>alternate - (boolean) Alternate shading in the table?
<span class="php-keyword1">DEFAULT</span>: <span class="php-keyword1">false</span>
<span class="php-keyword1">class</span> - (string) The <span class="php-keyword1">class</span> to <span class="php-keyword1">use</span> <span class="php-keyword1">for</span> the table.
<span class="php-keyword1">DEFAULT</span>: <span class="php-quote">''</span>
hideHeaders - (boolean) Don<span class="php-quote">'t render any HTML for the header row, just
use the widths.
DEFAULT: false
lines - (boolean) Show tree lines?
DEFAULT: true
lines_base - (boolean) Show tree lines for the base level? Requires
'</span>lines<span class="php-quote">' to be true also.
DEFAULT: false
multiline - (boolean) Do the node labels contain linebreaks?
DEFAULT: false</span></pre>
Overrides
|
public
string
|
#
getTree( boolean $static = false )
Returns the tree.
Parameters
- $static
- <p>If true the tree nodes can't be expanded and
collapsed and the tree gets rendered expanded.</p>
Returns
string The HTML code of the rendered tree.
|
public
|
#
addNodeParams( string $id, array $params = array() )
Adds additional parameters to a node.
Adds additional parameters to a node.
Parameters
- $id
- The unique node id.
- $params
- Parameters to set (key/value pairs).
<pre><span class="php-keyword1">class</span> - CSS <span class="php-keyword1">class</span> to <span class="php-keyword1">use</span> with this node
icon - Icon to display <span class="php-keyword2">next</span> node
iconalt - Alt text to <span class="php-keyword1">use</span> <span class="php-keyword1">for</span> the icon
iconopen - Icon to indicate this node <span class="php-keyword1">as</span> expanded
url - URL to <span class="php-keyword2">link</span> the node to
urlclass - CSS <span class="php-keyword1">class</span> <span class="php-keyword1">for</span> the node<span class="php-quote">'s URL
target - Target for the '</span>url<span class="php-quote">' link
title - Link tooltip title</span></pre>
Overrides
|
Methods inherited from Horde_Tree_Base
addNode(),
addNodeExtra(),
count(),
fallback(),
getOption(),
isExpanded(),
isSupported(),
renderTree(),
setOption(),
sort(),
sortHelper()
|