PHP 클래스 Horde_Tree_Renderer_Base, horde

Copyright 2010-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.
저자: Michael Slusarz ([email protected])
저자: Jan Schneider ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_colsLeft integer Keep count of how many extra columns there are on the left side of the node.
$_colsRight integer Keep count of how many extra columns there are on the right side of the node.
$_extra array An array containing extra columns for the tree nodes.
$_header array Hash with header information.
$_nodes array An array containing all the tree nodes.
$_options array Option values.
$_sortCriteria string Stores the sorting criteria temporarily.
$_static boolean Should the tree be rendered statically?
$_tree Horde_Tree The tree object.

공개 메소드들

메소드 설명
__construct ( Horde_Tree $tree, array $params = [] ) Constructor.
addNode ( array $node ) Adds a node to the node tree array.
addNodeExtra ( mixed $id, integer $side, array $extra ) Adds extra columns to be displayed to the side of the node.
addNodeParams ( string $id, array $params = [] ) Adds additional parameters to a node.
fallback ( ) : string Provide a simpler renderer to fallback to.
getOption ( string $option ) : mixed Gets an option's value.
getTree ( boolean $static = false ) : string Returns the tree.
isSupported ( ) : boolean Check the current environment to see if we can render the tree.
renderTree ( boolean $static = false ) Renders the tree.
setHeader ( array $header ) Adds column headers to the tree table.
setOption ( $options, mixed $value = null ) Sets an option.
sort ( string $criteria ) Sorts the tree by the specified node property.

보호된 메소드들

메소드 설명
_buildTree ( $id ) : string Recursive function to walk through the tree array and build the output.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Horde_Tree $tree, array $params = [] )
$tree Horde_Tree A tree object.
$params array Additional parameters.

_buildTree() 보호된 메소드

Should be overwritten by a sub-class if it doesn't implement its own getTree() method.
protected _buildTree ( $id ) : string
리턴 string The tree rendering.

addNode() 공개 메소드

Adds a node to the node tree array.
public addNode ( array $node )
$node array A hash with node properties: - id: (string) The unique node id. - parent: (string) The parent's unique node id. - label: (string) The text label for the node. - expanded: (boolean) Is this level expanded or not. - params: (array) Any other parameters to set (see addNodeParams() of the renderers for full details).

addNodeExtra() 공개 메소드

Adds extra columns to be displayed to the side of the node.
public addNodeExtra ( mixed $id, integer $side, array $extra )
$id mixed The unique node id.
$side integer Which side to place the extra columns on.
$extra array Extra columns to display.

addNodeParams() 공개 메소드

Adds additional parameters to a node.
public addNodeParams ( string $id, array $params = [] )
$id string The unique node id.
$params array Parameters to set (key/value pairs).

fallback() 공개 메소드

Provide a simpler renderer to fallback to.
public fallback ( ) : string
리턴 string The next best renderer.

getOption() 공개 메소드

Gets an option's value.
public getOption ( string $option ) : mixed
$option string The name of the option to fetch.
리턴 mixed The option's value.

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. This option has no effect in this driver.
리턴 string The HTML code of the rendered tree.

isSupported() 공개 메소드

Check the current environment to see if we can render the tree.
public isSupported ( ) : boolean
리턴 boolean Whether or not this backend will function.

renderTree() 공개 메소드

Renders the tree.
public renderTree ( boolean $static = false )
$static boolean If true the tree nodes can't be expanded and collapsed and the tree gets rendered expanded.

setHeader() 공개 메소드

Adds column headers to the tree table.
public setHeader ( array $header )
$header array An array containing hashes with header information.

setOption() 공개 메소드

Sets an option.
public setOption ( $options, mixed $value = null )
$value mixed The option's value.

sort() 공개 메소드

Sorts the tree by the specified node property.
public sort ( string $criteria )
$criteria string The node property to sort by.

프로퍼티 상세

$_colsLeft 보호되어 있는 프로퍼티

Keep count of how many extra columns there are on the left side of the node.
protected int $_colsLeft
리턴 integer

$_colsRight 보호되어 있는 프로퍼티

Keep count of how many extra columns there are on the right side of the node.
protected int $_colsRight
리턴 integer

$_extra 보호되어 있는 프로퍼티

An array containing extra columns for the tree nodes.
protected array $_extra
리턴 array

$_header 보호되어 있는 프로퍼티

Hash with header information.
protected array $_header
리턴 array

$_nodes 보호되어 있는 프로퍼티

An array containing all the tree nodes.
protected array $_nodes
리턴 array

$_options 보호되어 있는 프로퍼티

Option values.
protected array $_options
리턴 array

$_sortCriteria 보호되어 있는 프로퍼티

Stores the sorting criteria temporarily.
protected string $_sortCriteria
리턴 string

$_static 보호되어 있는 프로퍼티

Should the tree be rendered statically?
protected bool $_static
리턴 boolean

$_tree 보호되어 있는 프로퍼티

The tree object.
protected Horde_Tree $_tree
리턴 Horde_Tree