contenido\includes\api\functions.frontend.list.php

Show: PublicProtectedPrivateinherited
Table of Contents
Project: Contenido Content Management System

Description: Contenido Frontend list

Requirements:

Author
Timo A. Hummel  
Con_php_req
5.0  
Copyright
four for business AG  
License
http://www.contenido.org/license/LIZENZ.txt  
Link
http://www.4fb.de  
Link
http://www.contenido.org  
Package
Contenido Backend includes  
Since
file available since contenido release <= 4.6 {@internal created 2003-10-09 modified 2008-06-25, Frederic Schneider, add security fix $Id: functions.frontend.list.php 309 2008-06-26 10:06:56Z frederic.schneider $: }}  
Version
1.0.0  

\FrontendList

Package: Default
Class FrontendList Class for scrollable frontend lists
Children
\UploadList
\UploadList
Author
Timo A. Hummel  
Version
0.1  

Properties

>VPropertypublicarray $data = array()
Data container
Default valuearray()Details
Type
array
>VPropertypublicstring $endwrap
Wrap for table end
Details
Type
string
>VPropertypublicstring $itemwrap
Wrap for a single item
Details
Type
string
>VPropertypublicstring $listStart
Start page
Details
Type
string
>VPropertypublicstring $resultsPerPage
Number of records displayed per page
Details
Type
string
>VPropertypublicstring $startwrap
Wrap for table start
Details
Type
string

Methods

methodpublicFrontendList( $startwrap,  $endwrap,  $itemwrap) : void

Creates a new FrontendList object.

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 %%.

Parameters
NameTypeDescription
$startwrap

Wrap for the list start

$endwrap

Wrap for the list end

$itemwrap

Wrap for a single item

methodpublicconvert( $field,  $value) : void

Field converting facility.

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

Parameters
NameTypeDescription
$field

Field index

$value

Field value

methodpublicgetCurrentPage() : void

Returns the current page.

Details
Returns
Current page number  
methodpublicgetNumPages() : void

Returns the amount of pages.

Details
Returns
Amount of pages  
methodpublicoutput( $return = false) : void

Outputs or optionally returns

Parameters
NameTypeDescription
$return

If true, returns the list

methodpublicsetData( $index) : void

Sets data.

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.

Parameters
NameTypeDescription
$index

Numeric index

methodpublicsetListStart( $startpage) : void

Sets the starting page number.

Parameters
NameTypeDescription
$startpage

Page number on which the list display starts

methodpublicsetResultsPerPage( $numresults) : void

Sets the number of records per page.

Parameters
NameTypeDescription
$numresults

Amount of records per page

methodpublicsort( $field,  $order) : void

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

Parameters
NameTypeDescription
$field

Field index

$order

Sort order (see php's sort documentation)

Documentation was generated by phpDocumentor 2.0.0a12.