FacturaScripts

EditSettings extends EditSettings Uses ExtensionsTrait

Class created by Core/Base/PluginManager

Table of Contents

$extensions Stores class extensions. array
$hasData Indicates if the main view has data or is empty. bool
$tabsPosition Tabs position in page: left, bottom. string
$active Indicates the active view. string
$codeModel Model to use with select and autocomplete filters. CodeModel
$current Indicates current view, when drawing. string
$exportManager Object to export data. ExportManager
$views List of views displayed by the controller. \FacturaScripts\Core\Lib\ExtendedController\BaseView[]|\FacturaScripts\Core\Lib\ExtendedController\ListView[]
$className Name of the class of the controller (although its in inheritance from this class, the name of the final class we will have here) string
$dataBase It provides direct access to the database. DataBase
$empresa Selected company. Empresa
$multiRequestProtection MultiRequestProtection
$permissions User permissions on this controller. ControllerPermissions
$request Request on which we can get data. Request
$response HTTP Response object. Response
$template Name of the file for the template. string|bool
$title Title of the page. string
$uri Given uri, default is empty. string
$user User logged in. User|bool
__call() Executes the first matched extension. mixed
addExtension() mixed
pipe() mixed
getPageData() Return the basic data for this page. array
allSettingsXMLViews() Return a list of all XML settings files on XMLView folder. array
checkPaymentMethod() bool
checkWarehouse() bool
checkTax() bool
createDocTypeFilter() mixed
createViews() Inserts the views or tabs to display. mixed
createViewsApiKeys() mixed
createViewsIdFiscal() mixed
createViewFormats() mixed
createViewSequences() mixed
createViewStates() mixed
editAction() Runs the data edit action. bool
execAfterAction() Run the controller after actions. mixed
getKeyFromViewName() Returns the view id for a specified $viewName string
loadData() Loads the data to display. mixed
loadPaymentMethodValues() mixed
loadWarehouseValues() mixed
__construct() Initialize all objects and properties. mixed
getImageUrl() string
privateCore() Runs the controller's private logic. mixed
setTabsPosition() Sets the tabs position, by default is setted to 'left', also supported 'bottom' and 'top'. mixed
addEditListView() Adds a EditList type view to the controller. mixed
addEditView() Adds a Edit type view to the controller. mixed
addGridView() Adds a Grid type view to the controller. mixed
addHtmlView() Adds a HTML type view to the controller. mixed
addListView() Adds a List type view to the controller. mixed
execPreviousAction() Run the actions that alter data before reading it. bool
insertAction() Runs data insert action. bool
searchGridView() Returns the key of the first GridView. string
addButton() Adds a new button to the tab. mixed
addCustomView() mixed
getCurrentView() BaseView|ListView
getMainViewName() Returns the name assigned to the main view string
getSettings() Returns the configuration value for the indicated view. mixed
getViewModelValue() Return the value for a field in the model of the view. mixed
setCurrentView() mixed
setSettings() Set value for setting of a view mixed
autocompleteAction() Run the autocomplete action. array
checkOwnerData() Check if the active user has permission to view the information of the active record in the informed model. bool
deleteAction() Action to delete data. bool
exportAction() mixed
getAutocompleteValues() Return values from Widget Values for autocomplete action array
getOwnerFilter() Returns the where filter to apply to obtain the data created by the active user. \FacturaScripts\Core\Base\DataBase\DataBaseWhere[]
requestGet() Return array with parameters values array
validateFormToken() bool
getTemplate() Return the template to use for this controller. string|bool
publicCore() Execute the public part of the controller. mixed
redirect() Redirect to an url or controller. mixed
setTemplate() Set the template to use for this controller. bool
toolBox() ToolBox
url() Return the URL of the actual controller. string
checkPHPversion() mixed
getClassName() Return the name of the controller. string

Properties

$extensions

Stores class extensions.

protected static array $extensions = []

$hasData

Indicates if the main view has data or is empty.

public bool $hasData = false

$tabsPosition

Tabs position in page: left, bottom.

public string $tabsPosition

$current

Indicates current view, when drawing.

private string $current

$views

List of views displayed by the controller.

public \FacturaScripts\Core\Lib\ExtendedController\BaseView[]|\FacturaScripts\Core\Lib\ExtendedController\ListView[] $views = []

$className

Name of the class of the controller (although its in inheritance from this class, the name of the final class we will have here)

private string $className

$request

Request on which we can get data.

public Request $request

$response

HTTP Response object.

protected Response $response

$template

Name of the file for the template.

private string|bool $template

$uri

Given uri, default is empty.

public string $uri

Methods

__call()

Executes the first matched extension.

public __call( $name : string [, $arguments : array = [] ] ) : mixed
Parameters
$name : string
$arguments : array = []
Tags
throws
Return values
mixed

addExtension()

public static addExtension( $extension : mixed ) : mixed
Parameters
$extension : mixed
Return values
mixed

pipe()

public pipe( $name : string , ...$arguments : array ) : mixed
Parameters
$name : string
$arguments : array
Return values
mixed

getPageData()

Return the basic data for this page.

public getPageData( ) : array
Return values
array

allSettingsXMLViews()

Return a list of all XML settings files on XMLView folder.

private allSettingsXMLViews( ) : array
Return values
array

checkPaymentMethod()

protected checkPaymentMethod( ) : bool
Return values
bool

checkWarehouse()

protected checkWarehouse( ) : bool
Return values
bool

checkTax()

protected checkTax( ) : bool
Return values
bool

createDocTypeFilter()

protected createDocTypeFilter( $viewName : string ) : mixed
Parameters
$viewName : string
Return values
mixed

createViews()

Inserts the views or tabs to display.

protected abstract createViews( ) : mixed
Return values
mixed

createViewsApiKeys()

protected createViewsApiKeys( [ $viewName : string = 'ListApiKey' ] ) : mixed
Parameters
$viewName : string = 'ListApiKey'
Return values
mixed

createViewsIdFiscal()

protected createViewsIdFiscal( [ $viewName : string = 'EditIdentificadorFiscal' ] ) : mixed
Parameters
$viewName : string = 'EditIdentificadorFiscal'
Return values
mixed

createViewFormats()

protected createViewFormats( [ $viewName : string = 'ListFormatoDocumento' ] ) : mixed
Parameters
$viewName : string = 'ListFormatoDocumento'
Return values
mixed

createViewSequences()

protected createViewSequences( [ $viewName : string = 'ListSecuenciaDocumento' ] ) : mixed
Parameters
$viewName : string = 'ListSecuenciaDocumento'
Return values
mixed

createViewStates()

protected createViewStates( [ $viewName : string = 'ListEstadoDocumento' ] ) : mixed
Parameters
$viewName : string = 'ListEstadoDocumento'
Return values
mixed

editAction()

Runs the data edit action.

protected editAction( ) : bool
Return values
bool

execAfterAction()

Run the controller after actions.

protected execAfterAction( $action : string ) : mixed
Parameters
$action : string
Return values
mixed

getKeyFromViewName()

Returns the view id for a specified $viewName

private getKeyFromViewName( $viewName : string ) : string
Parameters
$viewName : string
Return values
string

loadData()

Loads the data to display.

protected abstract loadData( $viewName : string , $view : BaseView ) : mixed
Parameters
$viewName : string
$view : BaseView
Return values
mixed

loadPaymentMethodValues()

protected loadPaymentMethodValues( $viewName : string ) : mixed
Parameters
$viewName : string
Return values
mixed

loadWarehouseValues()

protected loadWarehouseValues( $viewName : string ) : mixed
Parameters
$viewName : string
Return values
mixed

__construct()

Initialize all objects and properties.

public __construct( $className : string [, $uri : string = '' ] ) : mixed
Parameters
$className : string
$uri : string = ''
Return values
mixed

setTabsPosition()

Sets the tabs position, by default is setted to 'left', also supported 'bottom' and 'top'.

public setTabsPosition( $position : string ) : mixed
Parameters
$position : string
Return values
mixed

addEditListView()

Adds a EditList type view to the controller.

protected addEditListView( $viewName : string , $modelName : string , $viewTitle : string [, $viewIcon : string = 'fas fa-bars' ] ) : mixed
Parameters
$viewName : string
$modelName : string
$viewTitle : string
$viewIcon : string = 'fas fa-bars'
Return values
mixed

addEditView()

Adds a Edit type view to the controller.

protected addEditView( $viewName : string , $modelName : string , $viewTitle : string [, $viewIcon : string = 'fas fa-edit' ] ) : mixed
Parameters
$viewName : string
$modelName : string
$viewTitle : string
$viewIcon : string = 'fas fa-edit'
Return values
mixed

addGridView()

Adds a Grid type view to the controller.

protected addGridView( $master : array , $detail : array , $viewTitle : string [, $viewIcon : string = 'fas fa-list-alt' ] ) : mixed

Master/Detail params: ['name' = 'viewName', 'model' => 'modelName']

Parameters
$master : array
$detail : array
$viewTitle : string
$viewIcon : string = 'fas fa-list-alt'
Tags
deprecated

will be removed in the next year

Return values
mixed

addHtmlView()

Adds a HTML type view to the controller.

protected addHtmlView( $viewName : string , $fileName : string , $modelName : string , $viewTitle : string [, $viewIcon : string = 'fab fa-html5' ] ) : mixed
Parameters
$viewName : string
$fileName : string
$modelName : string
$viewTitle : string
$viewIcon : string = 'fab fa-html5'
Return values
mixed

addListView()

Adds a List type view to the controller.

protected addListView( $viewName : string , $modelName : string , $viewTitle : string [, $viewIcon : string = 'fas fa-list' ] ) : mixed
Parameters
$viewName : string
$modelName : string
$viewTitle : string
$viewIcon : string = 'fas fa-list'
Return values
mixed

execPreviousAction()

Run the actions that alter data before reading it.

protected execPreviousAction( $action : string ) : bool
Parameters
$action : string
Return values
bool

insertAction()

Runs data insert action.

protected insertAction( ) : bool
Return values
bool

searchGridView()

Returns the key of the first GridView.

private searchGridView( ) : string
Return values
string

addButton()

Adds a new button to the tab.

public addButton( $viewName : string , $btnArray : array ) : mixed
Parameters
$viewName : string
$btnArray : array
Return values
mixed

getMainViewName()

Returns the name assigned to the main view

public getMainViewName( ) : string
Return values
string

getSettings()

Returns the configuration value for the indicated view.

public getSettings( $viewName : string , $property : string ) : mixed
Parameters
$viewName : string
$property : string
Return values
mixed

getViewModelValue()

Return the value for a field in the model of the view.

public getViewModelValue( $viewName : string , $fieldName : string ) : mixed
Parameters
$viewName : string
$fieldName : string
Return values
mixed

setCurrentView()

public setCurrentView( $viewName : string ) : mixed
Parameters
$viewName : string
Return values
mixed

setSettings()

Set value for setting of a view

public setSettings( $viewName : string , $property : string , $value : mixed ) : mixed
Parameters
$viewName : string
$property : string
$value : mixed
Return values
mixed

autocompleteAction()

Run the autocomplete action.

protected autocompleteAction( ) : array

Returns a JSON string for the searched values.

Return values
array

checkOwnerData()

Check if the active user has permission to view the information of the active record in the informed model.

protected checkOwnerData( $model : object ) : bool
Parameters
$model : object
Return values
bool

deleteAction()

Action to delete data.

protected deleteAction( ) : bool
Return values
bool

exportAction()

protected exportAction( ) : mixed
Return values
mixed

getAutocompleteValues()

Return values from Widget Values for autocomplete action

protected getAutocompleteValues( $viewName : string , $fieldName : string ) : array
Parameters
$viewName : string
$fieldName : string
Return values
array

getOwnerFilter()

Returns the where filter to apply to obtain the data created by the active user.

protected getOwnerFilter( $model : object ) : \FacturaScripts\Core\Base\DataBase\DataBaseWhere[]
Parameters
$model : object
Return values
\FacturaScripts\Core\Base\DataBase\DataBaseWhere[]

requestGet()

Return array with parameters values

protected requestGet( $keys : array ) : array
Parameters
$keys : array
Return values
array

validateFormToken()

protected validateFormToken( ) : bool
Return values
bool

getTemplate()

Return the template to use for this controller.

public getTemplate( ) : string|bool
Return values
string|bool

publicCore()

Execute the public part of the controller.

public publicCore( &$response : Response ) : mixed
Parameters
$response : Response
Return values
mixed

redirect()

Redirect to an url or controller.

public redirect( $url : string , $delay : int ) : mixed
Parameters
$url : string
$delay : int
Return values
mixed

setTemplate()

Set the template to use for this controller.

public setTemplate( $template : string|bool ) : bool
Parameters
$template : string|bool
Return values
bool

url()

Return the URL of the actual controller.

public url( ) : string
Return values
string

checkPHPversion()

private checkPHPversion( $min : float ) : mixed
Parameters
$min : float
Return values
mixed

getClassName()

Return the name of the controller.

protected getClassName( ) : string
Return values
string

Search results