Documentation

pm_View_Helper_ActiveList extends Zend_View_Helper_Abstract
in package
implements Zend_View_Helper_Interface

Helper for rendering active list

Tags
since
17.0

Interfaces, Classes and Traits

Zend_View_Helper_Interface

Table of Contents

LAYOUT_AUTO  = 'auto'
LAYOUT_RESPONSIVECOLUMN  = 'responsivecolumn'
$_componentType  : mixed
$_localeSection  : mixed
activeList()  : $this
Render active list
setData()  : $this
Set data
setLayout()  : $this
Set the layout for items. Layout may be specified as either as a String or as an Object:
setLocale()  : $this
Set locale

Constants

LAYOUT_RESPONSIVECOLUMN

public mixed LAYOUT_RESPONSIVECOLUMN = 'responsivecolumn'

Properties

$_componentType

protected mixed $_componentType = 'Jsw.ActiveList'

$_localeSection

protected mixed $_localeSection = 'components.active-list'

Methods

activeList()

Render active list

public activeList([array<string|int, mixed> $options = [] ]) : $this
$this->activeList([
    'data' => array,
    'layout' => string|array,
    'locale' => array,
]);
Parameters
$options : array<string|int, mixed> = []
Return values
$this

setData()

Set data

public setData(array<string|int, mixed> $data) : $this
$this->activeList()->setData([
    [
        'id' => string,
        'icon' => string, // optional
        'title' => string,
        'type' => string // optional
        'labels' => [ // optional
            [
                'type' => string,
                'value' => string
            ],
            ...
        ],
        'primaryActions' => [ // optional
            [
                'title' => string,
                'link' => string,
            ],
            ...
        ],
        'summary' => [ // optional
            [
                'name' => string,
                'value' => string,
            ],
            ...
        ],
        'toolbar' => [ // optional
            [
                'title' => string,
                'iconClass' => string,
                'link' => string,
            ],
            ...
        ],
        'services' => [ // optional
            [
                'title' => string,
                'icon' => string,
                'link' => string,
                'toolbar' => [ // optional
                    [
                        'title' => string,
                        'link' => string,
                    ],
                    ...
                ],
                'messages' => [ // optional
                    [
                        'icon' => string, // optional
                        'info' => string,
                        'noEscape' => bool, // optional, default is false
                    ],
                    ...
                ],
            ],
            ...
        ],
        'additionalHtml' => string, // optional
        'actions' => [ // optional
            [
                'title' => string,
                'icon' => string,
                'link' => string,
            ],
            ...
        ],
    ],
    ...
]);
Parameters
$data : array<string|int, mixed>
Return values
$this

setLayout()

Set the layout for items. Layout may be specified as either as a String or as an Object:

public setLayout(string|array<string|int, mixed> $layout) : $this

Specify as a String

$this->activeList()->setLayout(pm_View_Helper_ActiveList::LAYOUT_RESPONSIVECOLUMN);

Specify as an Object

$this->activeList()->setLayout([
    'type' => pm_View_Helper_ActiveList::LAYOUT_RESPONSIVECOLUMN,
    'stretched' => true,
    'columns' => 'xl-2 xxl-3',
]);

The type option can take the following values pm_View_Helper_ActiveList::LAYOUT_AUTO (by default) or pm_View_Helper_ActiveList::LAYOUT_RESPONSIVECOLUMN

The pm_View_Helper_ActiveList::LAYOUT_RESPONSIVECOLUMN layout id a simple grid-like layout for proportionally dividing container space and allocating it to each item. You can set additional optional options stretched and columns for this layout type.

The stretched option is making elements the equal height in row.

The columns option is whitespace separated configuration of how many columns in list for specific viewport size in following format (sm|md|lg|xl|xxl|xxxl)-(1-6). For example, 'xl-2 xxl-3' means that there will be 2 columns when viewport is "xl" and 3 columns when viewport is "xxl".

Parameters
$layout : string|array<string|int, mixed>
Return values
$this

setLocale()

Set locale

public setLocale([array<string|int, mixed> $locale = [] ]) : $this
$this->activeList()->setLocale([
    'noObjects' => $this->lmsg('noObjects'),
]);
Parameters
$locale : array<string|int, mixed> = []
Return values
$this

Search results