lists

# Class: lamList

Source Location: /lib/lists.inc

### Class Overview

Generates the list view.

#### Author(s):

- Roland Gruber

### Variables

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

### Constants

- LIST_SIZE_OPTION_NAME

### Methods

- __construct
- cmp_array
- getAdditionalTools
- listBuildFilter
- listConfigurationChanged
- listDoPost
- listDrawNavigationBar
- listGetAllConfigOptions
- listGetConfigOptionByID
- listGetParams
- listPrintButtons
- listPrintConfigurationPage
- listPrintFooter
- listPrintHeader
- listPrintRedirectMessages
- listPrintTableBody
- listPrintTableCellContent
- listPrintTableHeader
- listRefreshData
- listShowOUSelection
- listSort
- showPage

### Child classes:

lamAsteriskExtList
  Generates the list view.

lamMailAliasList
  Generates the list view.

lamHostList
  Generates the list view.

lamSmbDomainList
  Generates the list view.

lamGroupList
  Generates the list view.

lamUserList
  Generates the list view.

lamDHCPList
  Generates the list view.

lamNetgroupList
  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

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $descArray = array()

[line 59]

list of attribute descriptions

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $entries =

[line 77]

LDAP entries

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $filterPart = ''

[line 83]

LDAP filter part which was entered by user via filter boxes

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $filterText =

[line 80]

filter string to include in URL

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $labels =

[line 89]

list of account specific labels

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $maxPageEntries = 30

[line 62]

maximum count of entries per page

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $page = 1

[line 53]

current page number

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $possibleSuffixes =

[line 86]

list of possible LDAP suffixes(organizational units)

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $refresh = true

[line 74]

refresh page switch

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $sortColumn =

[line 65]

sort column name

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $sortDirection = 1

[line 68]

sort direction: 1 for ascending, -1 for descending

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $suffix =

[line 71]

LDAP suffix

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $type =

[line 50]

Account type

#### Tags:

access: | protected

Type: | mixed

[ Top ]

### Class Methods

### constructor __construct [line 103]

`lamList __construct( string $type)`

Constructor

#### Tags:

return: | list object
access: | public

Overridden in child classes as:

lamAsteriskExtList::__construct()
  Constructor

lamMailAliasList::__construct()
  Constructor

lamHostList::__construct()
  Constructor

lamSmbDomainList::__construct()
  Constructor

lamGroupList::__construct()
  Constructor

lamUserList::__construct()
  Constructor

lamDHCPList::__construct()
  Constructor

lamNetgroupList::__construct()
  Constructor

#### Parameters:

string | $type | account type

[ Top ]

### method cmp_array [line 251]

`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
access: | protected

#### Parameters:

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

[ Top ]

### method getAdditionalTools [line 854]

`lamListTool[] getAdditionalTools( )`

Returns a list of lamListTool objects to display next to the edit/delete buttons.

#### Tags:

return: | tools
access: | protected

Overridden in child classes as:

lamUserList::getAdditionalTools()
  Returns a list of lamListTool objects to display next to the edit/delete buttons.

[ Top ]

### method listBuildFilter [line 201]

`void listBuildFilter( )`

Builds the regular expressions from the filter values.

#### Tags:

access: | protected

[ Top ]

### method listConfigurationChanged [line 909]

`void listConfigurationChanged( )`

Called when the configuration options changed.

#### Tags:

access: | protected

Overridden in child classes as:

lamGroupList::listConfigurationChanged()
  Called when the configuration options changed.

lamUserList::listConfigurationChanged()
  Called when the configuration options changed.

[ Top ]

### method listDoPost [line 472]

`String listDoPost( )`

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

#### Tags:

return: | HTML fragment to insert into beginning of account list
access: | protected

Overridden in child classes as:

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

[ Top ]

### method listDrawNavigationBar [line 266]

`void listDrawNavigationBar( integer $count)`

Draws a navigation bar to switch between pages

#### Tags:

access: | protected

#### Parameters:

integer | $count | number of account entries

[ Top ]

### method listGetAllConfigOptions [line 863]

`array listGetAllConfigOptions( )`

Returns a list of possible configuration options.

#### Tags:

return: | list of lamListOption objects
access: | protected

Overridden in child classes as:

lamGroupList::listGetAllConfigOptions()
  Returns a list of possible configuration options.

lamUserList::listGetAllConfigOptions()
  Returns a list of possible configuration options.

[ Top ]

### method listGetConfigOptionByID [line 897]

`void listGetConfigOptionByID( String $ID)`

Returns the configuration option with the given ID.

#### Tags:

access: | protected

#### Parameters:

String | $ID | ID

[ Top ]

### method listGetParams [line 788]

`void listGetParams( )`

Sets some internal parameters.

#### Tags:

access: | protected

Overridden in child classes as:

lamGroupList::listGetParams()
  Sets some internal parameters.

lamUserList::listGetParams()
  Sets some internal parameters.

[ Top ]

### method listPrintButtons [line 672]

`void listPrintButtons( boolean $createOnly)`

Prints the create and delete buttons.

#### Tags:

access: | protected

Overridden in child classes as:

lamDHCPList::listPrintButtons()
  Prints the create, delete and PDF buttons.

#### Parameters:

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

[ Top ]

### method listPrintConfigurationPage [line 873]

`void listPrintConfigurationPage( )`

Prints the list configuration page.

#### Tags:

access: | protected

[ Top ]

### method listPrintFooter [line 732]

`void listPrintFooter( )`

Prints the HTML footer.

#### Tags:

access: | protected

[ Top ]

### method listPrintHeader [line 725]

`void listPrintHeader( )`

Prints the HTML header.

#### Tags:

access: | protected

[ Top ]

### method listPrintRedirectMessages [line 920]

`void listPrintRedirectMessages( )`

Prints messages when another page (e.g. delete/upload) redirects to the list view.

#### Tags:

access: | protected

[ Top ]

### method listPrintTableBody [line 367]

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

Prints the entry list

#### Tags:

access: | protected

#### Parameters:

array | $info | entries
| &$info |

[ Top ]

### method listPrintTableCellContent [line 453]

`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.

#### Tags:

access: | protected

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.

lamDHCPList::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 318]

`void listPrintTableHeader( )`

Prints the attribute and filter row at the account table head

#### Tags:

access: | protected

[ Top ]

### method listRefreshData [line 834]

`void listRefreshData( )`

Rereads the entries from LDAP.

#### Tags:

access: | protected

Overridden in child classes as:

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

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

[ Top ]

### method listShowOUSelection [line 654]

`void listShowOUSelection( )`

Prints a combobox with possible sub-DNs.

#### Tags:

access: | protected

[ Top ]

### method listSort [line 233]

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

Sorts an account list by a given attribute

#### Tags:

access: | protected

#### Parameters:

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

[ Top ]

### method showPage [line 143]

`void showPage( )`

Prints the HTML code to display the list view.

#### Tags:

access: | public

[ Top ]

### Class Constants

#### LIST_SIZE_OPTION_NAME = "L_SIZE"

[line 95]

ID for list size config option
[ Top ]

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