PHP Класс 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.
Автор: Marko Djukic ([email protected])
Автор: Jan Schneider ([email protected])
Наследование: extends Horde_Tree_Renderer_Base
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_altCount integer Current value of the alt tag count.
$_dropline array Drop line cache.
$_images array Images array.
$_node_pos array Node position list.

Открытые методы

Метод Описание
__construct ( string $name, array $params = [] ) Constructor.
getTree ( boolean $static = false ) : string Returns the tree.
setHeader ( array $header ) Adds column headers to the tree table.

Защищенные методы

Метод Описание
_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.

Описание методов

__construct() публичный Метод

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 _addColumn ( $column )

_buildHeader() защищенный Метод

Returns the HTML code for a header row, if necessary.
protected _buildHeader ( ) : string
Результат string The HTML code of the header row or an empty string.

_buildLine() защищенный Метод

Function to create a single line of the tree.
protected _buildLine ( string $node_id ) : string
$node_id string The Node ID.
Результат string The rendered line.

_buildTree() защищенный Метод

Recursive function to walk through the tree array and build the output.
protected _buildTree ( string $node_id ) : string
$node_id string The Node ID.
Результат string The tree rendering.

_generateImage() защищенный Метод

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.
Результат string A HTML tag to display the image.

_generateUrlTag() защищенный Метод

Generate a link URL.
protected _generateUrlTag ( string $node_id ) : string
$node_id string The node ID.
Результат string The link tag.

_setLabel() защищенный Метод

Sets the label on the tree line.
protected _setLabel ( string $node_id ) : string
$node_id string The Node ID.
Результат string The label for the tree line.

_setNodeIcon() защищенный Метод

Sets the icon for the node.
protected _setNodeIcon ( string $node_id ) : string
$node_id string The Node ID.
Результат string The node icon for the tree line.

_setNodeToggle() защищенный Метод

Sets the node toggle on the tree line.
protected _setNodeToggle ( string $node_id ) : string
$node_id string The Node ID.
Результат string The node toggle for the tree line.

getTree() публичный Метод

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.
Результат string The HTML code of the rendered tree.

setHeader() публичный Метод

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

Описание свойств

$_altCount защищенное свойство

Current value of the alt tag count.
protected int $_altCount
Результат integer

$_dropline защищенное свойство

Drop line cache.
protected array $_dropline
Результат array

$_images защищенное свойство

Images array.
protected array $_images
Результат array

$_node_pos защищенное свойство

Node position list.
protected array $_node_pos
Результат array