FacturaScripts

BaseView

Base definition for the views used in ExtendedControllers

Table of Contents

DEFAULT_TEMPLATE 'Master/BaseView.html.twig'
$columns \FacturaScripts\Dinamic\Lib\Widget\GroupItem[]
$count Total count of read rows. int
$cursor Cursor with data from the model display array
$icon string
$modals array
$model Model to use in this view. ModelClass
$name string
$newCode Stores the new code from the save() procedure, to use in loadData(). string
$offset Stores the offset for the cursor int
$order array
$pageOption Columns configuration PageOption
$rows array
$settings array
$template string
$title View title string
$where Stores the where parameters for the cursor. \FacturaScripts\Core\Base\DataBase\DataBaseWhere[]
export() Method to export the view data. bool
loadData() Loads view data. mixed
processFormData() Process form data. mixed
__construct() Construct and initialize the class mixed
columnModalForName() Gets the modal column by the column name ColumnItem
columnForName() Gets the column by the column name ColumnItem
columnForField() Gets the column by the given field name ColumnItem
disableColumn() Establishes the column's display or read only state. mixed
getColumns() Returns the column configuration \FacturaScripts\Dinamic\Lib\Widget\GroupItem[]
getModals() Returns the modal configuration \FacturaScripts\Dinamic\Lib\Widget\GroupItem[]
getPagination() array
getRow() If it exists, return the specified row type mixed
getViewName() Returns the name. string
loadFromData() Verifies the structure and loads into the model the given data array mixed
loadPageOptions() mixed
assets() Adds assets to the asset manager. mixed
getColumnForName() Gets the column by the column name from source group ColumnItem
getPageWhere() Returns DataBaseWhere[] for locate a pageOption model. mixed

Constants

DEFAULT_TEMPLATE

mixed $DEFAULT_TEMPLATE = 'Master/BaseView.html.twig'

Properties

$columns

protected \FacturaScripts\Dinamic\Lib\Widget\GroupItem[] $columns = []

$count

Total count of read rows.

public int $count = ""

$cursor

Cursor with data from the model display

public array $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 = ""

$where

Stores the where parameters for the cursor.

public \FacturaScripts\Core\Base\DataBase\DataBaseWhere[] $where = []

Methods

export()

Method to export the view data.

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

loadData()

Loads view data.

public abstract loadData( [ $code : mixed = '' ] [, $where : mixed = [] ] [, $order : mixed = [] ] , $offset : mixed [, $limit : mixed = FS_ITEM_LIMIT ] ) : mixed
Parameters
$code : mixed = ''
$where : mixed = []
$order : mixed = []
$offset : mixed
$limit : mixed = FS_ITEM_LIMIT
Return values
mixed

processFormData()

Process form data.

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

__construct()

Construct and initialize the class

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

columnModalForName()

Gets the modal column by the column name

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

columnForName()

Gets the column by the column name

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

columnForField()

Gets the column by the given field name

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

disableColumn()

Establishes the column's display or read only state.

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

getColumns()

Returns the column configuration

public getColumns( ) : \FacturaScripts\Dinamic\Lib\Widget\GroupItem[]
Return values
\FacturaScripts\Dinamic\Lib\Widget\GroupItem[]

getModals()

Returns the modal configuration

public getModals( ) : \FacturaScripts\Dinamic\Lib\Widget\GroupItem[]
Return values
\FacturaScripts\Dinamic\Lib\Widget\GroupItem[]

getPagination()

public getPagination( ) : array
Return values
array

getRow()

If it exists, return the specified row type

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

getViewName()

Returns the name.

public getViewName( ) : string
Return values
string

loadFromData()

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

public loadFromData( &$data : array ) : mixed
Parameters
$data : array
Return values
mixed

loadPageOptions()

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

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( $columnName : string , &$source : array ) : ColumnItem
Parameters
$columnName : string
$source : array
Return values
ColumnItem

getPageWhere()

Returns DataBaseWhere[] for locate a pageOption model.

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

Search results