# Docs For Class lamList

lists

# Class: lamList

Source Location: /lib/lists.inc

### Class Overview

Generates the list view.

#### Author(s):

- Roland Gruber

### Variables

- $attrArray
- $descArray
- $entries
- $filterText
- $labels
- $maxPageEntries
- $page
- $possibleSuffixes
- $refresh
- $sortColumn
- $suffix
- $type

### Methods

- lamList
- cmp_array
- listBuildFilter
- listDoPost
- listDrawNavigationBar
- listFilterAccounts
- listGetAttributeDescriptionList
- listGetParams
- listPrintAdditionalOptions
- listPrintButtons
- listPrintHeader
- listPrintJavaScript
- listPrintPDFButtons
- listPrintTableBody
- listPrintTableCellContent
- listPrintTableHeader
- listPrintToolLinks
- listRefreshData
- listShowOUSelection
- listSort
- showPage

### Child classes:

lamGroupList
  Generates the list view.

lamHostList
  Generates the list view.

lamMailAliasList
  Generates the list view.

lamSmbDomainList
  Generates the list view.

lamUserList
  Generates the list view.

### Class Details

[line 47]
Generates the list view.

#### Tags:

author: | Roland Gruber

[ Top ]

### Class Variables

#### $attrArray = array()

[line 56]

list of LDAP attributes

Type: | mixed

[ Top ]

#### $descArray = array()

[line 59]

list of attribute descriptions

Type: | mixed

[ Top ]

#### $entries =

[line 74]

LDAP entries

Type: | mixed

[ Top ]

#### $filterText =

[line 77]

filter string to include in URL

Type: | mixed

[ Top ]

#### $labels =

[line 83]

list of account specific labels

Type: | mixed

[ Top ]

#### $maxPageEntries = 10

[line 62]

maximum count of entries per page

Type: | mixed

[ Top ]

#### $page = 1

[line 53]

current page number

Type: | mixed

[ Top ]

#### $possibleSuffixes =

[line 80]

list of possible LDAP suffixes(organizational units)

Type: | mixed

[ Top ]

#### $refresh = true

[line 71]

refresh page switch

Type: | mixed

[ Top ]

#### $sortColumn =

[line 65]

sort column name

Type: | mixed

[ Top ]

#### $suffix =

[line 68]

LDAP suffix

Type: | mixed

[ Top ]

#### $type =

[line 50]

Account type

Type: | mixed

[ Top ]

### Class Methods

### constructor lamList [line 91]

`lamList lamList( string $type)`

Constructor

#### Tags:

return: | list object

#### Parameters:

string | $type | account type

[ Top ]

### method cmp_array [line 265]

`integer cmp_array( &$a, &$b, array $a, array $b)`

Compare function used for usort-method

Rows are sorted with the first attribute entry of the sort column. If objects have attributes with multiple values only the first is used for sorting.

#### Tags:

return: | 0 if both are equal, 1 if $a is greater, -1 if $b is greater

#### Parameters:

array | $a | first row which is compared
array | $b | second row which is compared
| &$a |
| &$b |

[ Top ]

### method listBuildFilter [line 167]

`array listBuildFilter( )`

Builds the regular expressions from the filter values.

#### Tags:

return: | filter data array($attribute => array('regex' => $reg, 'original' => $orig)) $reg is the regular expression to use, $orig the user's unmodified input string

[ Top ]

### method listDoPost [line 449]

`void listDoPost( )`

Manages all POST actions (e.g. button pressed) for the account lists.

Overridden in child classes as:

lamGroupList::listDoPost()
  Manages all POST actions (e.g. button pressed) for the account lists.

lamUserList::listDoPost()
  Manages all POST actions (e.g. button pressed) for the account lists.

[ Top ]

### method listDrawNavigationBar [line 284]

`void listDrawNavigationBar( integer $count)`

Draws a navigation bar to switch between pages

#### Parameters:

integer | $count | number of account entries

[ Top ]

### method listFilterAccounts [line 211]

`array listFilterAccounts( )`

Removes all entries which do not fit to the filter.

#### Tags:

return: | filtered list of accounts

[ Top ]

### method listGetAttributeDescriptionList [line 633]

`array listGetAttributeDescriptionList( )`

Returns an hash array containing with all attributes to be shown and their descriptions.

Format: array(attribute => description)

#### Tags:

return: | attribute list

[ Top ]

### method listGetParams [line 667]

`void listGetParams( )`

Sets some internal parameters.

Overridden in child classes as:

lamGroupList::listGetParams()
  Sets some internal parameters.

lamUserList::listGetParams()
  Sets some internal parameters.

[ Top ]

### method listPrintAdditionalOptions [line 729]

`void listPrintAdditionalOptions( )`

Prints additional option fields for specific object types.

Overridden in child classes as:

lamGroupList::listPrintAdditionalOptions()
  Prints additional option field for primary member display.

lamUserList::listPrintAdditionalOptions()
  Prints additional option fields for specific object types.

[ Top ]

### method listPrintButtons [line 539]

`void listPrintButtons( boolean $createOnly)`

Prints the create, delete and PDF buttons.

#### Parameters:

boolean | $createOnly | true if only the create button should be displayed

[ Top ]

### method listPrintHeader [line 576]

`void listPrintHeader( )`

Prints the HTML head.
[ Top ]

### method listPrintJavaScript [line 588]

`void listPrintJavaScript( )`

Prints JavaScript code needed for mouse-over effects.
[ Top ]

### method listPrintPDFButtons [line 559]

`void listPrintPDFButtons( )`

Prints the PDF button bar.
[ Top ]

### method listPrintTableBody [line 367]

`void listPrintTableBody( &$info, array $info)`

Prints the entry list

#### Parameters:

array | $info | entries
| &$info |

[ Top ]

### method listPrintTableCellContent [line 430]

`void listPrintTableCellContent( &$entry, &$attribute, array $entry, string $attribute)`

Prints the content of a cell in the account list for a given LDAP entry and attribute.

Overridden in child classes as:

lamGroupList::listPrintTableCellContent()
  Prints the content of a cell in the account list for a given LDAP entry and attribute.

lamUserList::listPrintTableCellContent()
  Prints the content of a cell in the account list for a given LDAP entry and attribute.

#### Parameters:

array | $entry | LDAP attributes
string | $attribute | attribute name
| &$entry |
| &$attribute |

[ Top ]

### method listPrintTableHeader [line 320]

`void listPrintTableHeader( )`

Prints the attribute and filter row at the account table head
[ Top ]

### method listPrintToolLinks [line 413]

`void listPrintToolLinks( $account)`

Prints the tool image links (e.g. edit and delete) for each account.

$account array LDAP attributes

#### Parameters:

| $account |

[ Top ]

### method listRefreshData [line 696]

`void listRefreshData( )`

Rereads the entries from LDAP.

Overridden in child classes as:

lamGroupList::listRefreshData()
  Rereads the entries from LDAP.

lamUserList::listRefreshData()
  Rereads the entries from LDAP.

[ Top ]

### method listShowOUSelection [line 519]

`void listShowOUSelection( )`

Prints a combobox with possible sub-DNs.
[ Top ]

### method listSort [line 246]

`array listSort( &$info, array $info)`

Sorts an account list by a given attribute

#### Tags:

return: | sorted account list

#### Parameters:

array | $info | the account list
| &$info |

[ Top ]

### method showPage [line 105]

`void showPage( )`

Prints the HTML code to display the list view.
[ Top ]

Documentation generated on Sun, 04 Nov 2007 12:10:55 +0100 by phpDocumentor 1.4.0