phpLDAPadmin

# Class: AJAXTree Source Location: /templates/3rdParty/pla/lib/AJAXTree.php
### Class Overview
    Tree
       |
       --HTMLTree
          |
          --AJAXTree
This class implements an AJAX based tree. #### Author(s): | ### Methods draw_children draw_item draw_javascript get_indentation listOpenItems
### Inherited Variables #### Class: HTMLTree HTMLTree::$javascript #### Class: Tree Tree::$entries | ### Inherited Methods #### Class: HTMLTree HTMLTree::draw() Displays the tree in HTML HTMLTree::draw_create_link() Print the HTML to show the "create new entry here". HTMLTree::draw_item() Recursively descend on the given dn and draw the tree in html HTMLTree::draw_javascript() If there is javascript, draw it HTMLTree::draw_logged_in_user() Draw the Logged in User HTMLTree::draw_login_link() Draw login link HTMLTree::draw_menu() Draw the tree menu options HTMLTree::draw_server_name() Draw the server name HTMLTree::getDepth() Work out how deep the "opened" tree is. HTMLTree::get_formatted_dn() HTMLTree::get_logout_menu_item() HTMLTree::get_menu_item() Get the HTML for each tree menu option #### 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 an AJAX based tree. #### Tags:
see: | HTMLTree Tree
[ Top ] ### Class Methods ### method draw_children [line 138]
`void draw_children( $parent_entry, $code)`
Expand and draw a child entry, when it is clicked on. This is using AJAX just to render this section of the tree. #### Tags:
access: | public
#### Parameters:
| $parent_entry |
| $code |
[ Top ] ### method draw_item [line 25]
`void draw_item( dn $item, string $level, [boolean $first_child = true], [boolean $last_child = true])`
Draw a node of the tree #### Tags:
access: | protected
Overrides HTMLTree::draw_item() (Recursively descend on the given dn and draw the tree in html) #### Parameters:
string | $level | a string of 0 and 1 ; $level == "000101" will draw " | |<node>"
boolean | $first_child | is the first child entry, which is normally the "Create New Entry" option
boolean | $last_child | is the last child entry, which is normally the "Create New Entry" option
dn | $item | The Base DN to draw
[ Top ] ### method draw_javascript [line 210]
`void draw_javascript( )`
Draw the javascript to support the tree. #### Tags:
access: | protected
Overrides HTMLTree::draw_javascript() (If there is javascript, draw it) [ Top ] ### method get_indentation [line 186]
`void get_indentation( $code $code)`
Return the indentation before a node #### Tags:
access: | protected
#### Parameters:
$code | $code | a string of 0 and 1 ; $code == "000101" will return " | |"
[ Top ] ### method listOpenItems [line 294]
`array listOpenItems( )`
List the items in the tree that are open #### Tags:
return: | List of open nodes
access: | public
[ Top ] Documentation generated on Tue, 22 Nov 2011 16:29:27 +0100 by phpDocumentor 1.4.1