ListingController
in package
Creates rendered lists (paging, filtering, sorting)
Tags
Table of Contents
Constants
- FILTERING_CLIENT_ONLY = 20
- FILTERING_DATA_AJAX = 19
- FILTERING_HTML_AJAX = 18
- FILTERING_NON_AJAX = 17
- FILTERING_OFF = 16
- PAGING_CLIENT_ONLY = 4
- Paging is done client side, no additional data is transferred after page load
- PAGING_DATA_AJAX = 3
- Only data is transferred via AJAX
- PAGING_HTML_AJAX = 2
- Paged HTML is transferred via AJAX
- PAGING_NON_AJAX = 1
- No AJAX, traditional page requests
- PAGING_OFF = 0
- Turn paging off
- SORTING_CLIENT_ONLY = 12
- SORTING_DATA_AJAX = 11
- SORTING_HTML_AJAX = 10
- SORTING_NON_AJAX = 9
- SORTING_OFF = 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
FILTERING_CLIENT_ONLY
public
mixed
FILTERING_CLIENT_ONLY
= 20
FILTERING_DATA_AJAX
public
mixed
FILTERING_DATA_AJAX
= 19
FILTERING_HTML_AJAX
public
mixed
FILTERING_HTML_AJAX
= 18
FILTERING_NON_AJAX
public
mixed
FILTERING_NON_AJAX
= 17
FILTERING_OFF
public
mixed
FILTERING_OFF
= 16
PAGING_CLIENT_ONLY
Paging is done client side, no additional data is transferred after page load
public
unknown
PAGING_CLIENT_ONLY
= 4
PAGING_DATA_AJAX
Only data is transferred via AJAX
public
int
PAGING_DATA_AJAX
= 3
PAGING_HTML_AJAX
Paged HTML is transferred via AJAX
public
int
PAGING_HTML_AJAX
= 2
PAGING_NON_AJAX
No AJAX, traditional page requests
public
int
PAGING_NON_AJAX
= 1
PAGING_OFF
Turn paging off
public
int
PAGING_OFF
= 0
SORTING_CLIENT_ONLY
public
mixed
SORTING_CLIENT_ONLY
= 12
SORTING_DATA_AJAX
public
mixed
SORTING_DATA_AJAX
= 11
SORTING_HTML_AJAX
public
mixed
SORTING_HTML_AJAX
= 10
SORTING_NON_AJAX
public
mixed
SORTING_NON_AJAX
= 9
SORTING_OFF
public
mixed
SORTING_OFF
= 8
Properties
$callback
Callback function to get data
protected
callable
$callback
= null
$count
How many results are returned
protected
int
$count
= 0
$criteria
Criteria the result must match
protected
array<string|int, mixed>
$criteria
= array()
$customFields
List all custom field names that are not as a field in the db
protected
array<string|int, mixed>
$customFields
= array()
$data
protected
DataSet
$data
= null
$dataSize
Number of entries without filtering or paging
protected
int
$dataSize
= 0
$entityClass
Entity class name
protected
string
$entityClass
= null
$filter
Filter at least one field of the result must match
protected
string
$filter
= ''
$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()
$filtering
protected
mixed
$filtering
$handlers
protected
mixed
$handlers
$listNumber
How many lists are there for this request
protected
static int
$listNumber
= 0
$offset
Offset to start from
protected
int
$offset
= 0
$options
protected
mixed
$options
$order
Order by array($field=>asc/desc)
protected
array<string|int, mixed>
$order
= 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()
$searching
protected
mixed
$searching
$entityName
Entity name
private
string
$entityName
= ''
$paging
private
mixed
$paging
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)
__toString()
public
__toString() : mixed
Tags
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
toHtml()
public
toHtml() : mixed