PHP Class Turba_View_List, horde

Copyright 2000-2016 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.
Author: Chuck Hagenbuch ([email protected])
Author: Jon Parise ([email protected])
Inheritance: implements Countable
Show file Open project: horde/horde Class Usage Examples

Public Properties

Property Type Description
$columns array 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 boolean Show/hide "edit" column in the display.
$showGroup boolean Show/hide "group" column in the display.
$showMark boolean Show/hide "mark" column in the display.
$showSort boolean Show/hide "sort" column in the display.
$showVcard boolean Show/hide "vcard" column in the display.
$type string Type of list.
$variables array A list of Horde_Form_Variable objects.
$vars Horde_Variables A Horde_Variables object.

Public Methods

Method Description
__construct ( Turba_List $list, array $controls = null, array $columns = null ) : Turba_View_List Constructs a new Turba_View_List object.
count ( ) : integer Returns the number of Turba_Objects that are in the list. Use this to hide internal implementation details from client objects.
display ( )
getAddSources ( )
getAlpha ( integer &$numDisplayed, string $alpha ) : string Renders the list contents that match $alpha into an HTML view.
getColumnName ( integer $i ) : string Retrieves a column's name
getColumnSortDirection ( integer $i )
getColumnSortImage ( integer $i, string $title = null ) : string
getPage ( integer &$numDisplayed, integer $min, integer $max = null, string $page ) : string Renders the list contents into an HTML view.
getSortInfoForColumn ( integer $i )
getSortOrderDescription ( ) : string Retrieves a natural language description of the sort order
getType ( ) : string
isPrimarySortColumn ( integer $i ) : boolean Determines whether this is the first column to sort by
isSortColumn ( integer $i ) : boolean Determines whether we are sorting on the specified column
setControls ( array $controls ) Set which controls are shown by the display templates.
setType ( string $type )

Protected Methods

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

Method Details

__construct() public method

Constructs a new Turba_View_List object.
public __construct ( Turba_List $list, array $controls = null, array $columns = null ) : Turba_View_List
$list Turba_List List of contacts to display.
$controls array Which icons to display
$columns array The list of columns to display
return Turba_View_List

_get() protected method

protected _get ( integer &$numDisplayed, object $filter, string $page ) : string
$numDisplayed integer Set to the number of displayed contacts.
$filter object A Turba_View_List filter object.
$page string The currently displayed page.
return string

count() public method

Returns the number of Turba_Objects that are in the list. Use this to hide internal implementation details from client objects.
public count ( ) : integer
return integer The number of objects in the list.

display() public method

public display ( )

getAddSources() public method

public getAddSources ( )

getAlpha() public method

Renders the list contents that match $alpha into an HTML view.
public getAlpha ( integer &$numDisplayed, string $alpha ) : string
$numDisplayed integer This will be set to the number of contacts in the view.
$alpha string The letter to display.
return string HTML of the list.

getColumnName() public method

Retrieves a column's name
public getColumnName ( integer $i ) : string
$i integer The zero-basd index of the column
return string

getColumnSortDirection() public method

public getColumnSortDirection ( integer $i )
$i integer The zero-based index of the column

getColumnSortImage() public method

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

getPage() public method

Renders the list contents into an HTML view.
public getPage ( integer &$numDisplayed, integer $min, integer $max = null, string $page ) : string
$numDisplayed integer Output parameter - the number of rows rendered.
$min integer Minimum number of rows to display.
$max integer Maximum number of rows to display.
$page string The currently displayed page.
return string HTML to echo.

getSortInfoForColumn() public method

public getSortInfoForColumn ( integer $i )
$i integer The zero-based index of the column

getSortOrderDescription() public method

Retrieves a natural language description of the sort order
public getSortOrderDescription ( ) : string
return string

getType() public method

public getType ( ) : string
return string

isPrimarySortColumn() public method

Determines whether this is the first column to sort by
public isPrimarySortColumn ( integer $i ) : boolean
$i integer The zero-based column index
return boolean

isSortColumn() public method

Determines whether we are sorting on the specified column
public isSortColumn ( integer $i ) : boolean
$i integer The zero-based column index
return boolean

setControls() public method

Set which controls are shown by the display templates.
public setControls ( array $controls )
$controls array

setType() public method

public setType ( string $type )
$type string

Property Details

$columns public property

Which columns to render
public array $columns
return array

$form public property

A dummy form object.
public Horde_Form $form
return Horde_Form

$list public property

The Turba_List object that we are visualizing.
public Turba_List $list
return Turba_List

$renderer public property

The HTML renderer.
public Horde_Core_Ui_VarRenderer_Html $renderer
return Horde_Core_Ui_VarRenderer_Html

$showEdit public property

Show/hide "edit" column in the display.
public bool $showEdit
return boolean

$showGroup public property

Show/hide "group" column in the display.
public bool $showGroup
return boolean

$showMark public property

Show/hide "mark" column in the display.
public bool $showMark
return boolean

$showSort public property

Show/hide "sort" column in the display.
public bool $showSort
return boolean

$showVcard public property

Show/hide "vcard" column in the display.
public bool $showVcard
return boolean

$type public property

Type of list.
public string $type
return string

$variables public property

A list of Horde_Form_Variable objects.
public array $variables
return array

$vars public property

A Horde_Variables object.
public Horde_Variables $vars
return Horde_Variables