FrontendList()
convert()
getCurrentPage()
getNumPages()
output()
setData()
setListStart()
setResultsPerPage()
sort()
$data
$endwrap
$itemwrap
$listStart
$resultsPerPage
$startwrap
Class FrontendList Class for scrollable frontend lists
| author | Timo A. Hummel <Timo.Hummel@4fb.de> |
|---|---|
| version | 0.1 |
FrontendList(\$startwrap $startwrap, \$endwrap $endwrap, \$itemwrap $itemwrap)
The placeholder for item wraps are the same as for sprintf. See the documentation for sprintf.
Caution: Make sure that percentage signs are written as %%.
\$startwrapWrap for the list start
\$endwrapWrap for the list end
\$itemwrapWrap for a single item
convert(\$field $field, \$value $value)
Needs to be overridden in the child class to work properbly.
\$fieldField index
\$valueField value
getCurrentPage()
| returns | Current page number |
|---|
getNumPages()
| returns | Amount of pages |
|---|
output(\$return $return)
\$returnIf true, returns the list
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.
\$indexNumeric index
setListStart(\$startpage $startpage)
\$startpagePage number on which the list display starts
setResultsPerPage(\$numresults $numresults)
\$numresultsAmount of records per page
sort(\$field $field, \$order $order)
\$fieldField index
\$orderSort order (see php's sort documentation)
$data : array
$endwrap : string
$itemwrap : string
$listStart : string
$resultsPerPage : string
$startwrap : string