Documentation

Common extends Base
in package

Class constructs grids

Table of Contents

$createButtonEndpoint  : string
Endpoint for create button
$deleteButton  : bool
Do we need to add delete button
$listDescription  : string
List description
$listTitle  : string
List title
$updateButton  : bool
Do we need to add update button
$noItemsTemplateName  : string
Name of the template for the empty records list
$customActions  : string
Custom actions for each record
$customHeaderActions  : string
Custom header actions
$fields  : array<string|int, mixed>
Fields
$listBuilderAdapter  : ListBuilderAdapter
Service logic adapter
$noItemsView  : string
No items block name
$recordTransformer  : array<string|int, mixed>
List item transformation callback
__construct()  : mixed
Constructor
getFields()  : array<string|int, mixed>
Method returns fields
listingForm()  : string
Method compiles listing form
setCustomActions()  : void
Method sets custom actions
setCustomHeaderActions()  : void
Method sets custom header actions
setNoItemsView()  : void
Method sets field $noItemsView
setRecordTransformer()  : void
Setting record transformer
getListBuilderAdapter()  : ListBuilderAdapter
Method returns list builder adapter
getNoItemsContent()  : string
Method returns content for the case when no items were found
listingHeaderCells()  : string
Method compiles header cells
listingItemsCells()  : string
Method compiles listing items cells
transformRecord()  : object
Method transforms database record
getCreatePageEndpoint()  : string
Method returns end point for the create page form
listingHeader()  : string
Method compiles listing header
listingHeaderContent()  : string
Method returns listing header content
listingItems()  : string
Method compiles listing items
listingNoItems()  : string
Method shows "no records" message instead of listing
listingRowActions()  : string
Method compiles row actions
listOfButtons()  : string
Method displays list of possible buttons
needActions()  : bool
Need to display actions in list

Properties

$createButtonEndpoint

Endpoint for create button

public string $createButtonEndpoint = ''

$deleteButton

Do we need to add delete button

public bool $deleteButton = false

$listDescription

List description

public string $listDescription = 'Выберите необходимое действие'

$listTitle

List title

public string $listTitle = 'Список записей'

$updateButton

Do we need to add update button

public bool $updateButton = false

$noItemsTemplateName

Name of the template for the empty records list

protected string $noItemsTemplateName = 'listing-no-items-with-buttons'

$customActions

Custom actions for each record

private string $customActions = ''

$customHeaderActions

Custom header actions

private string $customHeaderActions = ''

$fields

Fields

private array<string|int, mixed> $fields = []

$noItemsView

No items block name

private string $noItemsView = ''

$recordTransformer

List item transformation callback

private array<string|int, mixed> $recordTransformer = []

Methods

__construct()

Constructor

public __construct(array<string|int, mixed> $fields, ListBuilderAdapter $listBuilderAdapter) : mixed
Parameters
$fields : array<string|int, mixed>

List of fields

$listBuilderAdapter : ListBuilderAdapter

Adapter for the data source

Return values
mixed

getFields()

Method returns fields

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

fields

listingForm()

Method compiles listing form

public listingForm() : string
Return values
string

compiled listing form

setCustomActions()

Method sets custom actions

public setCustomActions(string $actions) : void
Parameters
$actions : string
Return values
void

setCustomHeaderActions()

Method sets custom header actions

public setCustomHeaderActions(string $actions) : void
Parameters
$actions : string
Return values
void

setNoItemsView()

Method sets field $noItemsView

public setNoItemsView(string $noItemsView) : void
Parameters
$noItemsView : string
Return values
void

setRecordTransformer()

Setting record transformer

public setRecordTransformer(mixed $recordTransformer) : void
Parameters
$recordTransformer : mixed

callable record transformer

Tags
codeCoverageIgnore
Return values
void

getNoItemsContent()

Method returns content for the case when no items were found

protected getNoItemsContent() : string
Return values
string

content for the case when no items were found

listingHeaderCells()

Method compiles header cells

protected listingHeaderCells() : string
Return values
string

compiled header

listingItemsCells()

Method compiles listing items cells

protected listingItemsCells() : string
Return values
string

Compiled row

transformRecord()

Method transforms database record

protected transformRecord(object $record) : object
Parameters
$record : object

Transforming record

Return values
object

Transformed record

getCreatePageEndpoint()

Method returns end point for the create page form

private getCreatePageEndpoint() : string
Return values
string

Create page endpoint

listingHeader()

Method compiles listing header

private listingHeader() : string
Return values
string

compiled header

listingHeaderContent()

Method returns listing header content

private listingHeaderContent() : string
Return values
string

compiled header

listingItems()

Method compiles listing items

private listingItems(array<string|int, mixed> $records) : string
Parameters
$records : array<string|int, mixed>

listof records

Return values
string

compiled list items

listingNoItems()

Method shows "no records" message instead of listing

private listingNoItems() : string
Return values
string

Compiled list view

listingRowActions()

Method compiles row actions

private listingRowActions() : string
Return values
string

compiled row

listOfButtons()

Method displays list of possible buttons

private listOfButtons() : string
Return values
string

compiled list buttons

needActions()

Need to display actions in list

private needActions() : bool
Return values
bool

do we need add actions

Search results