FacturaScripts

EditListView extends BaseView
in package

View definition for its use in ExtendedControllers

Tags
author

Carlos García Gómez [email protected]

author

Jose Antonio Cuello Principal [email protected]

Table of Contents

DEFAULT_TEMPLATE  = 'Master/EditListView.html.twig'
INLINE_TEMPLATE  = 'Master/EditListViewInLine.html.twig'
$count  : int
Total count of read rows.
$cursor  : array<string|int, mixed>
Cursor with data from the model display
$icon  : string
$model  : ModelClass
Model to use in this view.
$newCode  : string
Stores the new code from the save() procedure, to use in loadData().
$offset  : int
Stores the offset for the cursor
$order  : array<string|int, mixed>
$selected  : bool
Indicates if the view has been selected by the user.
$settings  : array<string|int, mixed>
$template  : string
$title  : string
View title
$where  : array<string|int, DataBaseWhere>
Stores the where parameters for the cursor.
$columns  : array<string|int, GroupItem>
$modals  : array<string|int, mixed>
$pageOption  : PageOption
Columns configuration
$rows  : array<string|int, mixed>
$name  : string
__construct()  : mixed
Construct and initialize the class
columnForField()  : ColumnItem|null
Gets the column by the given field name
columnForName()  : ColumnItem
Gets the column by the column name
columnModalForName()  : ColumnItem
Gets the modal column by the column name
disableColumn()  : BaseView
Establishes the column's display or read only state.
export()  : bool
Method to export the view data.
getColumns()  : array<string|int, GroupItem>
Returns the column configuration
getModals()  : array<string|int, GroupItem>
Returns the modal configuration
getPagination()  : array<string|int, mixed>
getRow()  : mixed
If it exists, return the specified row type
getViewName()  : string
Returns the name.
loadData()  : mixed
Load the data in the cursor property, according to the where filter specified.
loadFromData()  : mixed
Verifies the structure and loads into the model the given data array
loadPageOptions()  : mixed
processFormData()  : mixed
Process form data needed.
setInLine()  : mixed
Sets edit mode to single line.
setSettings()  : BaseView
assets()  : mixed
Adds assets to the asset manager.
getColumnForName()  : ColumnItem
Gets the column by the column name from source group
getPageWhere()  : mixed
Returns DataBaseWhere[] for locate a pageOption model.

Constants

DEFAULT_TEMPLATE

public mixed DEFAULT_TEMPLATE = 'Master/EditListView.html.twig'

INLINE_TEMPLATE

public mixed INLINE_TEMPLATE = 'Master/EditListViewInLine.html.twig'

Properties

$count

Total count of read rows.

public int $count = 0

$cursor

Cursor with data from the model display

public array<string|int, mixed> $cursor = []

$newCode

Stores the new code from the save() procedure, to use in loadData().

public string $newCode

$offset

Stores the offset for the cursor

public int $offset = 0

$order

public array<string|int, mixed> $order = []

$selected

Indicates if the view has been selected by the user.

public bool $selected

$settings

public array<string|int, mixed> $settings

$modals

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

$rows

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

Methods

__construct()

Construct and initialize the class

public __construct(string $name, string $title, string $modelName, string $icon) : mixed
Parameters
$name : string
$title : string
$modelName : string
$icon : string
Return values
mixed

columnForField()

Gets the column by the given field name

public columnForField(string $fieldName) : ColumnItem|null
Parameters
$fieldName : string
Return values
ColumnItem|null

columnForName()

Gets the column by the column name

public columnForName(string $columnName) : ColumnItem
Parameters
$columnName : string
Return values
ColumnItem

columnModalForName()

Gets the modal column by the column name

public columnModalForName(string $columnName) : ColumnItem
Parameters
$columnName : string
Return values
ColumnItem

disableColumn()

Establishes the column's display or read only state.

public disableColumn(string $columnName[, bool $disabled = true ][, string $readOnly = '' ]) : BaseView
Parameters
$columnName : string
$disabled : bool = true
$readOnly : string = ''
Return values
BaseView

export()

Method to export the view data.

public export(ExportManager &$exportManager, mixed $codes) : bool
Parameters
$exportManager : ExportManager
$codes : mixed
Return values
bool

getColumns()

Returns the column configuration

public getColumns() : array<string|int, GroupItem>
Return values
array<string|int, GroupItem>

getModals()

Returns the modal configuration

public getModals() : array<string|int, GroupItem>
Return values
array<string|int, GroupItem>

getPagination()

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

getRow()

If it exists, return the specified row type

public getRow(string $key) : mixed
Parameters
$key : string
Return values
mixed

getViewName()

Returns the name.

public getViewName() : string
Return values
string

loadData()

Load the data in the cursor property, according to the where filter specified.

public loadData([string $code = '' ][, array<string|int, DataBaseWhere$where = [] ][, array<string|int, mixed> $order = [] ][, int $offset = -1 ][, int $limit = FS_ITEM_LIMIT ]) : mixed

Adds an empty row/model at the end of the loaded data.

Parameters
$code : string = ''
$where : array<string|int, DataBaseWhere> = []
$order : array<string|int, mixed> = []
$offset : int = -1
$limit : int = FS_ITEM_LIMIT
Return values
mixed

loadFromData()

Verifies the structure and loads into the model the given data array

public loadFromData(array<string|int, mixed> &$data) : mixed
Parameters
$data : array<string|int, mixed>
Return values
mixed

loadPageOptions()

public loadPageOptions([User|false $user = false ]) : mixed
Parameters
$user : User|false = false
Return values
mixed

processFormData()

Process form data needed.

public processFormData(Request $request, string $case) : mixed
Parameters
$request : Request
$case : string
Return values
mixed

setInLine()

Sets edit mode to single line.

public setInLine(bool $value) : mixed
Parameters
$value : bool
Return values
mixed

setSettings()

public setSettings(string $key, mixed $value) : BaseView
Parameters
$key : string
$value : mixed
Return values
BaseView

assets()

Adds assets to the asset manager.

protected assets() : mixed
Return values
mixed

getColumnForName()

Gets the column by the column name from source group

protected getColumnForName(string $columnName, array<string|int, mixed> &$source) : ColumnItem
Parameters
$columnName : string
$source : array<string|int, mixed>
Return values
ColumnItem

getPageWhere()

Returns DataBaseWhere[] for locate a pageOption model.

protected getPageWhere([User|false $user = false ]) : mixed
Parameters
$user : User|false = false
Return values
mixed

Search results