Documentation

pm_View_List_Simple
in package

Base list

Tags
since
11.0

Table of Contents

COLUMN_SELECTION  = 'Jsw.list.COLUMN_SELECTION'
ITEMS_UNLIMITED  = 100000
SORT_DIR_DOWN  = 'down'
SORT_DIR_UP  = 'up'
$_columns  : array<string|int, mixed>
List columns
$_data  : array<string|int, mixed>
List data
$_dataUrl  : array<string|int, mixed>|string
URL for retrieving list data
$_defaultItemsPerPage  : int
Default value of items per page
$_defaultSortDirection  : string
Default sort direction Must be self::SORT_DIR_UP or self::SORT_DIR_DOWN
$_defaultSortField  : string
Default sort field
$_options  : array<string|int, mixed>
List context options
$_pageable  : bool
Paging allowed
$_tools  : array<string|int, mixed>
List tools
__construct()  : mixed
Create list
addSearchFilters()  : void
add search filters from associated array
fetchData()  : array<string|int, mixed>
Fetch list data
getId()  : string
Get unique list identifier
lmsg()  : string
Translate message by key according to current locale
setColumns()  : void
Set list columns from associated array
setData()  : void
Set list data from associated array
setDataUrl()  : void
Set URL for retrieving list data
setTools()  : void
Set list tools from associated array

Constants

COLUMN_SELECTION

public mixed COLUMN_SELECTION = 'Jsw.list.COLUMN_SELECTION'
Tags
since
12.5

ITEMS_UNLIMITED

public mixed ITEMS_UNLIMITED = 100000

SORT_DIR_DOWN

public mixed SORT_DIR_DOWN = 'down'

SORT_DIR_UP

public mixed SORT_DIR_UP = 'up'

Properties

$_columns

List columns

protected array<string|int, mixed> $_columns = []

$_data

List data

protected array<string|int, mixed> $_data = []

$_dataUrl

URL for retrieving list data

protected array<string|int, mixed>|string $_dataUrl = []

$_defaultItemsPerPage

Default value of items per page

protected int $_defaultItemsPerPage = 25

$_defaultSortDirection

Default sort direction Must be self::SORT_DIR_UP or self::SORT_DIR_DOWN

protected string $_defaultSortDirection = 'up'

$_defaultSortField

Default sort field

protected string $_defaultSortField

$_options

List context options

protected array<string|int, mixed> $_options

$_pageable

Paging allowed

protected bool $_pageable = rue

$_tools

List tools

protected array<string|int, mixed> $_tools = []

Methods

__construct()

Create list

public __construct(Zend_View $view, Zend_Controller_Request_Abstract $request[, array<string|int, mixed> $options = [] ]) : mixed
$options = [
    'pageable' => boolean,
    'defaultItemsPerPage' => int,
    'defaultSortField' => string,
    'defaultSortDirection' => string,
    'dataUrl' => array|string,
    'columns' => array,
    'data' => array,
    'tools' => array,
]
Parameters
$view : Zend_View
$request : Zend_Controller_Request_Abstract
$options : array<string|int, mixed> = []

Additional options available in $this->_options property

Return values
mixed

addSearchFilters()

add search filters from associated array

public addSearchFilters(array<string|int, mixed> $filters) : void
[
    'column-id' =>
    [
        'title' => string,
        'fields' => [string, string],
        'options' => [string => string],
    ]
]
Parameters
$filters : array<string|int, mixed>
Tags
since
12.5
Return values
void

fetchData()

Fetch list data

public fetchData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getId()

Get unique list identifier

public getId() : string
Return values
string

lmsg()

Translate message by key according to current locale

public lmsg(string $key[, array<string|int, mixed> $params = [] ]) : string
Parameters
$key : string
$params : array<string|int, mixed> = []
Tags
since
12.0

added argument $params

Return values
string

setColumns()

Set list columns from associated array

public setColumns(array<string|int, mixed> $columns) : void
[
    'first-column-id' => [
        'title' => string,
        'noEscape' => bool,
        'searchable' => bool,
        'sortable' => bool,
    ],
    ...
]
Parameters
$columns : array<string|int, mixed>
Return values
void

setData()

Set list data from associated array

public setData(array<string|int, mixed> $data) : void
[
    [
        'first-column-id' => string,
    ],
    ...
]
Parameters
$data : array<string|int, mixed>
Return values
void

setDataUrl()

Set URL for retrieving list data

public setDataUrl(array<string|int, mixed>|string $params) : void
[
    'controller' => string,
    'action' => string,
    'link' => string,
]
Parameters
$params : array<string|int, mixed>|string
Return values
void

setTools()

Set list tools from associated array

public setTools(array<string|int, mixed> $tools) : void
[
    [
        'title' => string,
        'description' => string,
        'class' => string,
        'controller' => string,
        'action' => string,
        'link' => string,
        'execGroupOperation' => string|[
            'url' => string,
            'submitHandler' => 'function(url, ids) }'
        ],
    ],
]
Parameters
$tools : array<string|int, mixed>
Return values
void

Search results