Class FrontendList Class for scrollable frontend lists
author | Timo A. Hummel <Timo.Hummel@4fb.de> |
---|---|
version | 0.1 |
FrontendList($startwrap, $endwrap, $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 %%.
Wrap for the list start
Wrap for the list end
Wrap for a single item
convert($field, $value)
Needs to be overridden in the child class to work properbly.
Field index
Field value
getCurrentPage() : \s
\s
Current page numbergetNumPages() : \s
\s
Amount of pagesoutput($return)
If true, returns the list
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.
Numeric index
setListStart($startpage)
Page number on which the list display starts
setResultsPerPage($numresults)
Amount of records per page
sort($field, $order)
Field index
Sort order (see php's sort documentation)
$data : array
$endwrap : string
$itemwrap : string
$listStart : string
$resultsPerPage : string
$startwrap : string