phpLDAPadmin

# Class: HTMLTree

Source Location: /templates/3rdParty/pla/lib/HTMLTree.php

### Class Overview

    Tree
       |
       --HTMLTree

This class implements a straight HTML tree - no AJAX rendering is used.

#### Author(s):

### Variables

- $javascript

### Methods

- draw
- draw_create_link
- draw_item
- draw_javascript
- draw_logged_in_user
- draw_login_link
- draw_menu
- draw_server_name
- getDepth
- get_formatted_dn
- get_logout_menu_item
- get_menu_item

### Child classes:

AJAXTree
  This class implements an AJAX based tree.

### Inherited Variables

#### Class: Tree

Tree::$entries

### Inherited Methods

#### Class: Tree

Tree::__construct()
Tree::addEntry()
  Add an entry in the tree view ; the entry is added in the children array of its parent
Tree::delEntry()
  Delete an entry from the tree view ; the entry is deleted from the children array of its parent
Tree::draw()
  Displays the LDAP tree
Tree::getBaseEntries()
  Get the entries that are BaseDN entries.
Tree::getEntry()
  Get a tree entry
Tree::getInstance()
  Create an instance of the tree - this is used when we call this class directly Tree::getInstance($index)
Tree::getServer()
  Get the server Object for this tree
Tree::getServerID()
  Get the Server ID for this tree
Tree::readChildren()
  Read the children of a tree entry
Tree::readChildrenNumber()
  Return the number of children an entry has. Optionally autoread the child entry.
Tree::renameEntry()
  Rename an entry in the tree

### Class Details

[line 16]
This class implements a straight HTML tree - no AJAX rendering is used.

#### Tags:

see: | AJAXTree Tree

[ Top ]

### Class Variables

#### $javascript = ''

[line 17]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

### Class Methods

### method draw [line 27]

`void draw( [boolean $onlytree = false])`

Displays the tree in HTML

#### Tags:

access: | public

Overrides Tree::draw() (Displays the LDAP tree)

#### Parameters:

boolean | $onlytree | Only display the tree, or include the server name and menu items

[ Top ]

### method draw_create_link [line 495]

`void draw_create_link( dn $rdn, int $level, dn $encoded_dn)`

Print the HTML to show the "create new entry here".

#### Tags:

access: | protected

#### Parameters:

dn | $rdn |
int | $level |
dn | $encoded_dn |

[ Top ]

### method draw_item [line 401]

`void draw_item( $item, int $level, dn $dn)`

Recursively descend on the given dn and draw the tree in html

#### Tags:

access: | protected

Overridden in child classes as:

AJAXTree::draw_item()
  Draw a node of the tree

#### Parameters:

dn | $dn | Current dn.
int | $level | Level to start drawing (start to -1)
| $item |

[ Top ]

### method draw_javascript [line 542]

`void draw_javascript( )`

If there is javascript, draw it

#### Tags:

access: | protected

Overridden in child classes as:

AJAXTree::draw_javascript()
  Draw the javascript to support the tree.

[ Top ]

### method draw_logged_in_user [line 342]

`void draw_logged_in_user( )`

Draw the Logged in User

#### Tags:

access: | protected

[ Top ]

### method draw_login_link [line 513]

`void draw_login_link( )`

Draw login link

#### Tags:

access: | protected

[ Top ]

### method draw_menu [line 181]

`void draw_menu( )`

Draw the tree menu options

#### Tags:

access: | protected

[ Top ]

### method draw_server_name [line 158]

`void draw_server_name( )`

Draw the server name

#### Tags:

access: | protected

[ Top ]

### method getDepth [line 557]

`void getDepth( )`

Work out how deep the "opened" tree is.

#### Tags:

access: | public

[ Top ]

### method get_formatted_dn [line 478]

`void get_formatted_dn( $entry, $level)`

#### Tags:

access: | protected

#### Parameters:

| $entry |
| $level |

[ Top ]

### method get_logout_menu_item [line 325]

`void get_logout_menu_item( )`

#### Tags:

access: | protected

[ Top ]

### method get_menu_item [line 207]

`void get_menu_item( $item)`

Get the HTML for each tree menu option

#### Tags:

access: | protected

#### Parameters:

| $item |

[ Top ]

Documentation generated on Tue, 22 Nov 2011 16:29:50 +0100 by phpDocumentor 1.4.1