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

package | phpLDAPadmin
subpackage | Tree
see | \global\AJAXTree

### Methods

## Add an entry in the tree view ; the entry is added in the children array of its parent

    addEntry(\dn | string $dn)

Inherited

inherited_from | \Tree::addEntry()

### Parameters

#### $dn

`\dn` `string`

DN to add

## Delete an entry from the tree view ; the entry is deleted from the children array of its parent

    delEntry(\dn $dn)

Inherited

inherited_from | \Tree::delEntry()

### Parameters

#### $dn

`\dn`

DN to remote

## Displays the tree in HTML

    draw(boolean $onlytree)

### Parameters

#### $onlytree

`boolean`

Only display the tree, or include the server name and menu items

## Get the entries that are BaseDN entries.

    getBaseEntries() : array

Inherited

inherited_from | \Tree::getBaseEntries()

### Returns

`array`Base DN entries

## Work out how deep the "opened" tree is.

    getDepth()

## Get a tree entry

    getEntry(\dn $dn) : object

Inherited

inherited_from | \Tree::getEntry()

### Parameters

#### $dn

`\dn`

DN to retrieve

### Returns

`object`Tree DN object

## Create an instance of the tree - this is used when we call this class directly Tree::getInstance($index)

    getInstance($server_id) : object

Inherited

inherited_from | \Tree::getInstance()

### Parameters

#### $server_id

### Returns

`object`Tree

## Read the children of a tree entry

    readChildren(\dn $dn, boolean $nolimit)

Inherited

inherited_from | \Tree::readChildren()

### Parameters

#### $dn

`\dn`

DN of the entry

#### $nolimit

`boolean`

LDAP Size Limit

## Rename an entry in the tree

    renameEntry(\dn $dnOLD, \dn $dnNEW)

Inherited

inherited_from | \Tree::renameEntry()

### Parameters

#### $dnOLD

`\dn`

Old DN

#### $dnNEW

`\dn`

New DN

## __construct()

    __construct($server_id)

Inherited

inherited_from | \Tree::__construct()

### Parameters

#### $server_id

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

    draw_create_link(\dn $rdn, int $level, \dn $encoded_dn)

### Parameters

#### $rdn

`\dn`

#### $level

`int`

#### $encoded_dn

`\dn`

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

    draw_item($item, int $level)

### Parameters

#### $item

#### $level

`int`

Level to start drawing (start to -1)

## If there is javascript, draw it

    draw_javascript()

## Draw the Logged in User

    draw_logged_in_user()

## Draw login link

    draw_login_link()

## Draw the server name

    draw_server_name()

## Get the server Object for this tree

    getServer() : object

Inherited

inherited_from | \Tree::getServer()

### Returns

`object`Server Object for this tree

## Get the Server ID for this tree

    getServerID() : int

Inherited

inherited_from | \Tree::getServerID()

### Returns

`int`Server ID that this tree is for

## get_formatted_dn()

    get_formatted_dn($entry, $level)

### Parameters

#### $entry

#### $level

## Return the number of children an entry has.

    readChildrenNumber(\dn $dn, boolean $nolimit)

Inherited

Optionally autoread the child entry.

inherited_from | \Tree::readChildrenNumber()

### Parameters

#### $dn

`\dn`

DN of the entry

#### $nolimit

`boolean`

LDAP Size Limit

## This function will take the DN, convert it to lowercase and strip unnessary commas.

    indexDN(\dn $dn) : \dn

Inherited

This result will be used as the index for the tree object. Any display of a DN should use the object->dn entry, not the index. The reason we need to do this is because: uid=User A,ou=People,c=AU and uid=User B, ou=PeOpLe, c=au are infact in the same branch, but PLA will show them inconsistently.

inherited_from | \Tree::indexDN()

### Parameters

#### $dn

`\dn`

DN to clean

### Returns

`\dn`Lowercase clean DN

### Properties

## $entries

    $entries

Inherited

inherited_from | \Tree::$$entries

## $javascript

    $javascript

## $server_id

    $server_id

Inherited

inherited_from | \Tree::$$server_id