Documentation

ListingController

Creates rendered lists (paging, filtering, sorting)

Tags
author

ritt0r drissg@gmail.com

subpackage

coremodule_listing

Table of Contents

Constants

FILTERING_CLIENT_ONLY  : mixed = 20
FILTERING_DATA_AJAX  : mixed = 19
FILTERING_HTML_AJAX  : mixed = 18
FILTERING_NON_AJAX  : mixed = 17
FILTERING_OFF  : mixed = 16
PAGING_CLIENT_ONLY  : unknown = 4
Paging is done client side, no additional data is transferred after page load
PAGING_DATA_AJAX  : int = 3
Only data is transferred via AJAX
PAGING_HTML_AJAX  : int = 2
Paged HTML is transferred via AJAX
PAGING_NON_AJAX  : int = 1
No AJAX, traditional page requests
PAGING_OFF  : int = 0
Turn paging off
SORTING_CLIENT_ONLY  : mixed = 12
SORTING_DATA_AJAX  : mixed = 11
SORTING_HTML_AJAX  : mixed = 10
SORTING_NON_AJAX  : mixed = 9
SORTING_OFF  : mixed = 8

Properties

$callback  : callable
Callback function to get data
$count  : int
How many results are returned
$criteria  : array<string|int, mixed>
Criteria the result must match
$customFields  : array<string|int, mixed>
List all custom field names that are not as a field in the db
$data  : DataSet
$dataSize  : int
Number of entries without filtering or paging
$entityClass  : string
Entity class name
$filter  : string
Filter at least one field of the result must match
$filterCallback  : array<string|int, mixed>|callable
List with callbacks for expanded search
$filterFields  : array<string|int, mixed>
List of field names that can be filtered
$filtering  : mixed
$handlers  : mixed
$listNumber  : int
How many lists are there for this request
$offset  : int
Offset to start from
$options  : mixed
$order  : array<string|int, mixed>
Order by array($field=>asc/desc)
$searchCallback  : array<string|int, mixed>|callable
List with callbacks for search
$searchFields  : array<string|int, mixed>
List of field names that can be searched by a term
$searching  : mixed
$entityName  : string
Entity name
$paging  : mixed

Methods

__construct()  : mixed
Handles a list
__toString()  : mixed
getData()  : DataSet
Loads the data of an object
getDataSize()  : int
Returns the number of entries without filtering or paging This only returns the correct value after getData() is called
toHtml()  : mixed

Constants

PAGING_CLIENT_ONLY

Paging is done client side, no additional data is transferred after page load

public unknown PAGING_CLIENT_ONLY = 4

Properties

$customFields

List all custom field names that are not as a field in the db

protected array<string|int, mixed> $customFields = array()

$filterCallback

List with callbacks for expanded search

protected array<string|int, mixed>|callable $filterCallback

$filterFields

List of field names that can be filtered

protected array<string|int, mixed> $filterFields = array()

$searchCallback

List with callbacks for search

protected array<string|int, mixed>|callable $searchCallback

$searchFields

List of field names that can be searched by a term

protected array<string|int, mixed> $searchFields = array()

Methods

__construct()

Handles a list

public __construct(mixed $entities[, array<string|int, mixed> $crit = array() ][, mixed $filter = '' ][, array<string|int, mixed> $options = array() ]) : mixed
Parameters
$entities : mixed

Entity class name as string or callback function (experimental)

$crit : array<string|int, mixed> = array()

(optional) Doctrine style criteria array to use

$filter : mixed = ''
$options : array<string|int, mixed> = array()

(Unused)

getData()

Loads the data of an object

public getData(array<string|int, mixed> $args[, bool $forceRegen = false ]) : DataSet
Parameters
$args : array<string|int, mixed>

Pass parsed GET params here

$forceRegen : bool = false

(optional) If set to true, cached data is dropped

Return values
DataSet —

Parsed data

getDataSize()

Returns the number of entries without filtering or paging This only returns the correct value after getData() is called

public getDataSize() : int
Return values
int —

Number of entries

On this page

Search results