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/BusinessDocumentView.html.twig'
ITEM_SELECT_LIMIT
mixed
$ITEM_SELECT_LIMIT
= 500
MODEL_NAMESPACE
mixed
$MODEL_NAMESPACE
= '\\FacturaScripts\\Dinamic\\Model\\'
MODEL_NAMESPACE_LIB
mixed
$MODEL_NAMESPACE_LIB
= '\\FacturaScripts\\Dinamic\\Lib\\'
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
= []
$model
Model to use in this view.
public
TransformerDocument
$model
$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
= []
$icon
public
string
$icon
$modals
protected
array
$modals
= []
$model
Model to use in this view.
public
ModelClass
$model
$name
private
string
$name
$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
= ""
$order
public
array
$order
= []
$pageOption
Columns configuration
protected
PageOption
$pageOption
$rows
protected
array
$rows
= []
$settings
public
array
$settings
$template
public
string
$template
$title
View title
public
string
$title
$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
mixedexport()
Method to export the view data.
public
export(
&$exportManager :
ExportManager
, $codes :
mixed
)
: bool
Parameters
- $exportManager : ExportManager
- $codes : mixed
Return values
boolgetColumns()
Returns the column configuration
public
getColumns(
)
: \FacturaScripts\Dinamic\Lib\Widget\ColumnItem[]
Return values
\FacturaScripts\Dinamic\Lib\Widget\ColumnItem[]getMaxLines()
public
getMaxLines(
)
: int
Return values
intgetLineData()
Returns the data of lines to the view.
public
getLineData(
)
: string
Return values
stringgetSelectValues()
Returns an array with all data from selected model.
public
getSelectValues(
$modelName :
string
)
: array
Parameters
- $modelName : string
Return values
arrayloadData()
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
mixedprocessFormLines()
Process form lines to add missing data from data form.
public
processFormLines(
$formLines :
array
)
: array
Also adds order column.
Parameters
- $formLines : array
Return values
arrayprocessFormData()
Process form data.
public
processFormData(
$request :
Request
, $case :
string
)
: mixed
Parameters
- $request : Request
- $case : string
Return values
mixedassets()
Adds assets to the asset manager.
protected
assets(
)
: mixed
Return values
mixedgetCellAlign()
protected
getCellAlign(
$code :
string
)
: string
Parameters
- $code : string
Return values
stringexport()
Method to export the view data.
public
abstract export(
&$exportManager :
mixed
, $codes :
mixed
)
: bool
Parameters
- $exportManager : mixed
- $codes : mixed
Return values
boolloadData()
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
mixedprocessFormData()
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
mixedcolumnModalForName()
Gets the modal column by the column name
public
columnModalForName(
$columnName :
string
)
: ColumnItem
Parameters
- $columnName : string
Return values
ColumnItemcolumnForName()
Gets the column by the column name
public
columnForName(
$columnName :
string
)
: ColumnItem
Parameters
- $columnName : string
Return values
ColumnItemcolumnForField()
Gets the column by the given field name
public
columnForField(
$fieldName :
string
)
: ColumnItem
Parameters
- $fieldName : string
Return values
ColumnItemdisableColumn()
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
mixedgetColumns()
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
arraygetRow()
If it exists, return the specified row type
public
getRow(
$key :
string
)
: mixed
Parameters
- $key : string
Return values
mixedgetViewName()
Returns the name.
public
getViewName(
)
: string
Return values
stringloadFromData()
Verifies the structure and loads into the model the given data array
public
loadFromData(
&$data :
array
)
: mixed
Parameters
- $data : array
Return values
mixedloadPageOptions()
public
loadPageOptions(
[ $user :
User|bool
= false ]
)
: mixed
Parameters
- $user : User|bool = false
Return values
mixedassets()
Adds assets to the asset manager.
protected
assets(
)
: mixed
Return values
mixedgetColumnForName()
Gets the column by the column name from source group
protected
getColumnForName(
$columnName :
string
, &$source :
array
)
: ColumnItem
Parameters
- $columnName : string
- $source : array
Return values
ColumnItemgetPageWhere()
Returns DataBaseWhere[] for locate a pageOption model.
protected
getPageWhere(
[ $user :
User|bool
= false ]
)
: mixed
Parameters
- $user : User|bool = false