PHP Class Horde_Tree_Renderer_Html, horde

Additional node parameters: - class: CSS class to use with this node - icon: Icon to display next node - iconalt: Alt text to use for the icon - iconopen: Icon to indicate this node as expanded - url: URL to link the node to - urlclass: CSS class for the node's URL - target: Target for the 'url' link - title: Link tooltip title Copyright 2003-2016 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.
Author: Marko Djukic ([email protected])
Author: Jan Schneider ([email protected])
Inheritance: extends Horde_Tree_Renderer_Base
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_altCount integer Current value of the alt tag count.
$_dropline array Drop line cache.
$_images array Images array.
$_node_pos array Node position list.

Méthodes publiques

Méthode Description
__construct ( string $name, array $params = [] ) Constructor.
getTree ( boolean $static = false ) : string Returns the tree.
setHeader ( array $header ) Adds column headers to the tree table.

Méthodes protégées

Méthode Description
_addColumn ( $column )
_buildHeader ( ) : string Returns the HTML code for a header row, if necessary.
_buildLine ( string $node_id ) : string Function to create a single line of the tree.
_buildTree ( string $node_id ) : string Recursive function to walk through the tree array and build the output.
_generateImage ( string $src, string $class = '', string $alt = null ) : string Generate the icon image.
_generateUrlTag ( string $node_id ) : string Generate a link URL.
_setLabel ( string $node_id ) : string Sets the label on the tree line.
_setNodeIcon ( string $node_id ) : string Sets the icon for the node.
_setNodeToggle ( string $node_id ) : string Sets the node toggle on the tree line.

Method Details

__construct() public méthode

Constructor.
public __construct ( string $name, array $params = [] )
$name string The name of this tree instance.
$params array Additional parameters:
alternate - (boolean) Alternate shading in the table?
            DEFAULT: false
class - (string) The class to use for the table.
        DEFAULT: ''
hideHeaders - (boolean) Don'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
             'lines' to be true also.
             DEFAULT: false
multiline - (boolean) Do the node labels contain linebreaks?
            DEFAULT: false

_addColumn() protected méthode

protected _addColumn ( $column )

_buildHeader() protected méthode

Returns the HTML code for a header row, if necessary.
protected _buildHeader ( ) : string
Résultat string The HTML code of the header row or an empty string.

_buildLine() protected méthode

Function to create a single line of the tree.
protected _buildLine ( string $node_id ) : string
$node_id string The Node ID.
Résultat string The rendered line.

_buildTree() protected méthode

Recursive function to walk through the tree array and build the output.
protected _buildTree ( string $node_id ) : string
$node_id string The Node ID.
Résultat string The tree rendering.

_generateImage() protected méthode

Generate the icon image.
protected _generateImage ( string $src, string $class = '', string $alt = null ) : string
$src string The source image.
$class string Additional class to add to image.
$alt string Alt text to add to the image.
Résultat string A HTML tag to display the image.

_generateUrlTag() protected méthode

Generate a link URL.
protected _generateUrlTag ( string $node_id ) : string
$node_id string The node ID.
Résultat string The link tag.

_setLabel() protected méthode

Sets the label on the tree line.
protected _setLabel ( string $node_id ) : string
$node_id string The Node ID.
Résultat string The label for the tree line.

_setNodeIcon() protected méthode

Sets the icon for the node.
protected _setNodeIcon ( string $node_id ) : string
$node_id string The Node ID.
Résultat string The node icon for the tree line.

_setNodeToggle() protected méthode

Sets the node toggle on the tree line.
protected _setNodeToggle ( string $node_id ) : string
$node_id string The Node ID.
Résultat string The node toggle for the tree line.

getTree() public méthode

Returns the tree.
public getTree ( boolean $static = false ) : string
$static boolean If true the tree nodes can't be expanded and collapsed and the tree gets rendered expanded.
Résultat string The HTML code of the rendered tree.

setHeader() public méthode

Adds column headers to the tree table.
public setHeader ( array $header )
$header array An array containing hashes with header information. The following keys are allowed:
class - The CSS class of the header cell
html - The HTML content of the header cell

Property Details

$_altCount protected_oe property

Current value of the alt tag count.
protected int $_altCount
Résultat integer

$_dropline protected_oe property

Drop line cache.
protected array $_dropline
Résultat array

$_images protected_oe property

Images array.
protected array $_images
Résultat array

$_node_pos protected_oe property

Node position list.
protected array $_node_pos
Résultat array