\Turba_View_List

The Turba_View_List:: class provides an interface for objects that visualize Turba_List objects.

Copyright 2000-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (ASL). If you did did not receive this file, see http://www.horde.org/licenses/apache.

Summary

Methods
Properties
Constants
__construct()
setControls()
setType()
getType()
display()
getPage()
getAlpha()
getColumnName()
getSortInfoForColumn()
getColumnSortImage()
getSortOrderDescription()
getColumnSortDirection()
isSortColumn()
isPrimarySortColumn()
getAddSources()
count()
$list
$showMark
$showEdit
$showVcard
$showGroup
$showSort
$type
$renderer
$vars
$variables
$form
$columns
No constants found
_get()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$list

$list : \Turba_List

The Turba_List object that we are visualizing.

Type

\Turba_List

$showMark

$showMark : boolean

Show/hide "mark" column in the display.

Type

boolean

$showEdit

$showEdit : boolean

Show/hide "edit" column in the display.

Type

boolean

$showVcard

$showVcard : boolean

Show/hide "vcard" column in the display.

Type

boolean

$showGroup

$showGroup : boolean

Show/hide "group" column in the display.

Type

boolean

$showSort

$showSort : boolean

Show/hide "sort" column in the display.

Type

boolean

$type

$type : string

Type of list.

Type

string

$renderer

$renderer : \Horde_Core_Ui_VarRenderer_Html

The HTML renderer.

Type

\Horde_Core_Ui_VarRenderer_Html

$vars

$vars : \Horde_Variables

A Horde_Variables object.

Type

\Horde_Variables

$variables

$variables : array

A list of Horde_Form_Variable objects.

Type

array

$form

$form : \Horde_Form

A dummy form object.

Type

\Horde_Form

$columns

$columns : array

Which columns to render

Type

array

Methods

__construct()

__construct(\Turba_List  $list, array  $controls = null, array  $columns = null) : \Turba_View_List

Constructs a new Turba_View_List object.

Parameters

\Turba_List $list

List of contacts to display.

array $controls

Which icons to display

array $columns

The list of columns to display

Returns

\Turba_View_List

setControls()

setControls(array  $controls) 

Set which controls are shown by the display templates.

Parameters

array $controls

setType()

setType(string  $type) 

Parameters

string $type

getType()

getType() : string

Returns

string

display()

display() 

getPage()

getPage(integer  $numDisplayed, integer  $min, integer  $max = null, string  $page) : string

Renders the list contents into an HTML view.

Parameters

integer $numDisplayed

Output parameter - the number of rows rendered.

integer $min

Minimum number of rows to display.

integer $max

Maximum number of rows to display.

string $page

The currently displayed page.

Returns

string —

HTML to echo.

getAlpha()

getAlpha(integer  $numDisplayed, string  $alpha) : string

Renders the list contents that match $alpha into an HTML view.

Parameters

integer $numDisplayed

This will be set to the number of contacts in the view.

string $alpha

The letter to display.

Returns

string —

HTML of the list.

getColumnName()

getColumnName(integer  $i) : string

Retrieves a column's name

Parameters

integer $i

The zero-basd index of the column

Returns

string

getSortInfoForColumn()

getSortInfoForColumn(integer  $i) 

Parameters

integer $i

The zero-based index of the column

getColumnSortImage()

getColumnSortImage(integer  $i, string  $title = null) : string

Parameters

integer $i
string $title

Returns

string

getSortOrderDescription()

getSortOrderDescription() : string

Retrieves a natural language description of the sort order

Returns

string

getColumnSortDirection()

getColumnSortDirection(integer  $i) 

Parameters

integer $i

The zero-based index of the column

isSortColumn()

isSortColumn(integer  $i) : boolean

Determines whether we are sorting on the specified column

Parameters

integer $i

The zero-based column index

Returns

boolean

isPrimarySortColumn()

isPrimarySortColumn(integer  $i) : boolean

Determines whether this is the first column to sort by

Parameters

integer $i

The zero-based column index

Returns

boolean

getAddSources()

getAddSources() 

count()

count() : integer

Returns the number of Turba_Objects that are in the list. Use this to hide internal implementation details from client objects.

Returns

integer —

The number of objects in the list.

_get()

_get(integer  $numDisplayed, object  $filter, string  $page) : string

Parameters

integer $numDisplayed

Set to the number of displayed contacts.

object $filter

A Turba_View_List filter object.

string $page

The currently displayed page.

Returns

string