Documentation

Turba_View_List
in package
implements Countable

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.

Tags
author

Chuck Hagenbuch chuck@horde.org

author

Jon Parise jon@csh.rit.edu

category

Horde

license

http://www.horde.org/licenses/apache ASL

Interfaces, Classes, Traits and Enums

Countable

Table of Contents

$columns  : array<string|int, mixed>
Which columns to render
$form  : Horde_Form
A dummy form object.
$list  : Turba_List
The Turba_List object that we are visualizing.
$renderer  : Horde_Core_Ui_VarRenderer_Html
The HTML renderer.
$showEdit  : bool
Show/hide "edit" column in the display.
$showGroup  : bool
Show/hide "group" column in the display.
$showMark  : bool
Show/hide "mark" column in the display.
$showSort  : bool
Show/hide "sort" column in the display.
$showVcard  : bool
Show/hide "vcard" column in the display.
$type  : string
Type of list.
$variables  : array<string|int, mixed>
A list of Horde_Form_Variable objects.
$vars  : Horde_Variables
A Horde_Variables object.
__construct()  : Turba_View_List
Constructs a new Turba_View_List object.
count()  : int
Returns the number of Turba_Objects that are in the list. Use this to hide internal implementation details from client objects.
display()  : mixed
getAddSources()  : mixed
getAlpha()  : string
Renders the list contents that match $alpha into an HTML view.
getColumnName()  : string
Retrieves a column's name
getColumnSortDirection()  : mixed
getColumnSortImage()  : string
getPage()  : string
Renders the list contents into an HTML view.
getSortInfoForColumn()  : mixed
getSortOrderDescription()  : string
Retrieves a natural language description of the sort order
getType()  : string
isPrimarySortColumn()  : bool
Determines whether this is the first column to sort by
isSortColumn()  : bool
Determines whether we are sorting on the specified column
setControls()  : mixed
Set which controls are shown by the display templates.
setType()  : mixed
_get()  : string

Properties

$columns

Which columns to render

public array<string|int, mixed> $columns

$form

A dummy form object.

public Horde_Form $form = \null

$list

The Turba_List object that we are visualizing.

public Turba_List $list

$renderer

The HTML renderer.

public Horde_Core_Ui_VarRenderer_Html $renderer

$showEdit

Show/hide "edit" column in the display.

public bool $showEdit = \false

$showGroup

Show/hide "group" column in the display.

public bool $showGroup = \false

$showMark

Show/hide "mark" column in the display.

public bool $showMark = \false

$showSort

Show/hide "sort" column in the display.

public bool $showSort = \false

$showVcard

Show/hide "vcard" column in the display.

public bool $showVcard = \false

$type

Type of list.

public string $type

$variables

A list of Horde_Form_Variable objects.

public array<string|int, mixed> $variables = array()

$vars

A Horde_Variables object.

public Horde_Variables $vars

Methods

__construct()

Constructs a new Turba_View_List object.

public __construct(Turba_List $list[, array<string|int, mixed> $controls = null ][, array<string|int, mixed> $columns = null ]) : Turba_View_List
Parameters
$list : Turba_List

List of contacts to display.

$controls : array<string|int, mixed> = null

Which icons to display

$columns : array<string|int, mixed> = null

The list of columns to display

Return values
Turba_View_List

count()

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

public count() : int
Return values
int

The number of objects in the list.

display()

public display() : mixed
Tags
TODO:

these should be injected when we refactor to Horde_View

global

$prefs

global

$session

Return values
mixed

getAddSources()

public getAddSources() : mixed
Return values
mixed

getAlpha()

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

public getAlpha(int &$numDisplayed, string $alpha) : string
Parameters
$numDisplayed : int

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

$alpha : string

The letter to display.

Return values
string

HTML of the list.

getColumnName()

Retrieves a column's name

public getColumnName(int $i) : string
Parameters
$i : int

The zero-basd index of the column

Return values
string

getColumnSortDirection()

public getColumnSortDirection(int $i) : mixed
Parameters
$i : int

The zero-based index of the column

Return values
mixed

getColumnSortImage()

public getColumnSortImage(int $i[, string $title = null ]) : string
Parameters
$i : int
$title : string = null
Return values
string

getPage()

Renders the list contents into an HTML view.

public getPage(int &$numDisplayed, int $min[, int $max = null ], string $page) : string
Parameters
$numDisplayed : int

Output parameter - the number of rows rendered.

$min : int

Minimum number of rows to display.

$max : int = null

Maximum number of rows to display.

$page : string

The currently displayed page.

Return values
string

HTML to echo.

getSortInfoForColumn()

public getSortInfoForColumn(int $i) : mixed
Parameters
$i : int

The zero-based index of the column

Return values
mixed

getSortOrderDescription()

Retrieves a natural language description of the sort order

public getSortOrderDescription() : string
Return values
string

getType()

public getType() : string
Return values
string

isPrimarySortColumn()

Determines whether this is the first column to sort by

public isPrimarySortColumn(int $i) : bool
Parameters
$i : int

The zero-based column index

Return values
bool

isSortColumn()

Determines whether we are sorting on the specified column

public isSortColumn(int $i) : bool
Parameters
$i : int

The zero-based column index

Return values
bool

setControls()

Set which controls are shown by the display templates.

public setControls(array<string|int, mixed> $controls) : mixed
Parameters
$controls : array<string|int, mixed>
Return values
mixed

setType()

public setType(string $type) : mixed
Parameters
$type : string
Return values
mixed

_get()

protected _get(int &$numDisplayed, object $filter, string $page) : string
Parameters
$numDisplayed : int

Set to the number of displayed contacts.

$filter : object

A Turba_View_List filter object.

$page : string

The currently displayed page.

Return values
string

Search results