Jet\UI_tree
Renderer of a special element showing the tree structure. It inherits from Jet\UI_Renderer_Single.
Přehled metod
Method | Meaning of |
---|---|
public setData( Data_Tree $data ) : void |
Sets the tree structure that the element will work with. |
public getData( ) : Data_Tree |
Returns the tree structure the element is working with. |
public setSelectedId( string $selected_id ) : void |
Sets the ID of the node to be considered as the currently selected node. |
public getSelectedId( ) : string |
Returns the ID of the node that is considered as currently selected. |
public setRootId( string $root_id ) : void |
Sets the ID of the node to be considered the root node. Thus, only part of the tree structure can be displayed. |
public getRootId( ) : string |
Returns the ID of the node that is considered the root node. |
public setShowAll( bool $show_all ) : void |
Sets whether or not to display the whole tree. If false, then only those branches that lead to the currently selected node are displayed. |
public getShowAll( ) : bool |
Indicates whether or not to display the whole tree. If false, then only those branches that lead to the currently selected node are displayed. |
public setRendererNormal( callable $renderer ) : void |
For example, it sets an anonymous function to display the label of a tree node that is neither selected nor open. Renderer must be set. The prototype of the method is:
function( Data_Tree_Node $node ) : void {
|
public setRendererSelected( callable $renderer ) : void |
For example, it sets an anonymous function to display the label of the currently selected tree node. The renderer must be set. The prototype of the method is:
function( Data_Tree_Node $node ) : void {
|
public setRendererOpened( callable $renderer ) : void |
For example, it sets an anonymous function to display the label of a tree node that is open but not currently selected. The renderer must be set. The prototype of the method is:
function( Data_Tree_Node $node ) : void {
|
public getNodeRenderer( Data_Tree_Node $node ) : callable |
Returns the appropriate renderer for the node according to the node state (selected, open, or normal). Used in view script. |
public nodeFilter( Data_Tree_Node $node ) : bool |
Indicates whether the node can be displayed at all. Used in view script. |
public nodeSelected( Data_Tree_Node $node ) : bool |
Indicates whether the node is currently selected. Used in view script. |
public nodeOpened( Data_Tree_Node $node ) : bool |
Indicates whether the node is currently open. Used in view script. |