FacturaScripts

BusinessDocumentView extends BaseView

Description of BusinessDocumentView

Table of Contents

DEFAULT_TEMPLATE 'Master/BusinessDocumentView.html.twig'
ITEM_SELECT_LIMIT 500
MODEL_NAMESPACE '\\FacturaScripts\\Dinamic\\Model\\'
MODEL_NAMESPACE_LIB '\\FacturaScripts\\Dinamic\\Lib\\'
$documentStatus \FacturaScripts\Dinamic\Model\EstadoDocumento[]
$lines Lines of document, the body. \FacturaScripts\Core\Model\Base\BusinessDocumentLine[]
$model Model to use in this view. TransformerDocument
$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[]
__construct() Construct and initialize the class mixed
export() Method to export the view data. bool
getColumns() Returns the column configuration \FacturaScripts\Dinamic\Lib\Widget\ColumnItem[]
getMaxLines() int
getLineData() Returns the data of lines to the view. string
getSelectValues() Returns an array with all data from selected model. array
loadData() Loads view data. mixed
processFormLines() Process form lines to add missing data from data form. array
processFormData() Process form data. mixed
assets() Adds assets to the asset manager. mixed
getCellAlign() string
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

$documentStatus

public \FacturaScripts\Dinamic\Model\EstadoDocumento[] $documentStatus = []

$lines

Lines of document, the body.

public \FacturaScripts\Core\Model\Base\BusinessDocumentLine[] $lines = []

$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

__construct()

Construct and initialize the class

public __construct( $name : string , $title : string , $modelName : string [, $icon : string = 'fas fa-file' ] ) : mixed
Parameters
$name : string
$title : string
$modelName : string
$icon : string = 'fas fa-file'
Return values
mixed

getColumns()

Returns the column configuration

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

getLineData()

Returns the data of lines to the view.

public getLineData( ) : string
Return values
string

getSelectValues()

Returns an array with all data from selected model.

public getSelectValues( $modelName : string ) : array
Parameters
$modelName : string
Return values
array

loadData()

Loads view data.

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

processFormLines()

Process form lines to add missing data from data form.

public processFormLines( $formLines : array ) : array

Also adds order column.

Parameters
$formLines : array
Return values
array

processFormData()

Process form data.

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

assets()

Adds assets to the asset manager.

protected assets( ) : mixed
Return values
mixed

getCellAlign()

protected getCellAlign( $code : string ) : string
Parameters
$code : string
Return values
string

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