Class ScrollableList Class for scrollable backend lists

 Methods

Creates a new FrontendList object.

cScrollList($defaultstyle, $action) 

Parameters

$defaultstyle

boolean use the default style for object initializing?

$action

Field converting facility.

convert($field, $value, $hiddendata) 

Needs to be overridden in the child class to work properbly.

Parameters

$field

Field index

$value

Field value

$hiddendata

Returns the current page.

getCurrentPage() 
returns Current page number

Returns the amount of pages.

getNumPages() 
returns Amount of pages

Is called when a new column is rendered

onRenderColumn($column) 

Parameters

$column

Is called when a new row is rendered

onRenderRow($row) 

Parameters

$row

The current row which is being rendered

Outputs or optionally returns

render($return) 

Parameters

$return

If true, returns the list

Sets the custom parameters for sortable links

setCustom($key, $custom) 

$obj->setCustom($key, $custom);

Parameters

$key

Custom entry key

$custom

Custom entry value

Sets data.

setData($index) 

Note: This function eats as many parameters as you specify.

Example: $obj->setData(0, "foo", "bar");

Make sure that the amount of parameters stays the same for all setData calls in a single object. Also make sure that your index starts from 0 and ends with the actual number - 1.

Parameters

$index

Numeric index

Sets header data.

setHeader() 

Note: This function eats as many parameters as you specify.

Example: $obj->setHeader("foo", "bar");

Make sure that the amount of parameters stays the same for all setData calls in a single object.

Sets hidden data.

setHiddenData($index) 

Note: This function eats as many parameters as you specify.

Example: $obj->setHiddenData(0, "foo", "bar");

Make sure that the amount of parameters stays the same for all setData calls in a single object. Also make sure that your index starts from 0 and ends with the actual number - 1.

Parameters

$index

Numeric index

Sets the starting page number.

setListStart($startpage) 

Parameters

$startpage

Page number on which the list display starts

Sets the number of records per page.

setResultsPerPage($numresults) 

Parameters

$numresults

Amount of records per page

Sets the sortable flag for a specific row.

setSortable($key, $sortable) 

$obj->setSortable(true);

Parameters

$key

$sortable

boolean true or false

Sorts the list by a given field and a given order.

sort($field, $order) 

Parameters

$field

Field index

$order

Sort order (see php's sort documentation)

 Properties

 

$data : array
 

$header : array
 

$listStart : string
 

$objHeaderItem 
 

$objHeaderRow 
 

$objItem 
 

$objRow 
 

$objTable 
 

$resultsPerPage : string
 

$sortable : string