Class ScrollableList Class for scrollable backend lists

 Methods

Creates a new FrontendList object.

cScrollList(\$defaultstyle $defaultstyle, $action) 

Parameters

$defaultstyle

\$defaultstyle

boolean use the default style for object initializing?

$action

Field converting facility.

convert(\$field $field, \$value $value, $hiddendata) 

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

Parameters

$field

\$field

Field index

$value

\$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(\$row $column) 

Parameters

$column

\$row

The current column which is being rendered

Is called when a new row is rendered

onRenderRow(\$row $row) 

Parameters

$row

\$row

The current row which is being rendered

Outputs or optionally returns

render(\$return $return) 

Parameters

$return

\$return

If true, returns the list

Sets the custom parameters for sortable links

setCustom(\$key $key, \$custom $custom) 

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

Parameters

$key

\$key

Custom entry key

$custom

\$custom

Custom entry value

Sets data.

setData(\$index $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

\$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 $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

\$index

Numeric index

Sets the starting page number.

setListStart(\$startpage $startpage) 

Parameters

$startpage

\$startpage

Page number on which the list display starts

Sets the number of records per page.

setResultsPerPage(\$numresults $numresults) 

Parameters

$numresults

\$numresults

Amount of records per page

Sets the sortable flag for a specific row.

setSortable(\$sortable $key, $sortable) 

$obj->setSortable(true);

Parameters

$key

\$sortable

boolean true or false

$sortable

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

sort(\$field $field, \$order $order) 

Parameters

$field

\$field

Field index

$order

\$order

Sort order (see php's sort documentation)

 Properties

 

Data container

$data : array

 

Header container

$header : array

 

Start page

$listStart : string

 

Header item

$objHeaderItem 

 

Header row

$objHeaderRow 

 

Header item

$objItem 

 

Header item

$objRow 

 

Table item

$objTable 

 

Number of records displayed per page

$resultsPerPage : string

 

sortable flag

$sortable : string