FacturaScripts

EditPais extends EditController

Controller to edit a single item from the Pais model

Table of Contents

$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
getModelClassName() Returns the model name. string
getPageData() Returns basic page attributes. array
createProvinceView() mixed
createViews() Create tabs or views. mixed
loadData() Loads the data to display. mixed
getModelClassName() Returns the class name of the model to use in the editView. mixed
getModel() Pointer to the data model. mixed
getPageData() Return the basic data for this page. array
createViews() Inserts the views or tabs to display. mixed
loadData() Loads the data to display. 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
editAction() Runs the data edit action. bool
execAfterAction() Run the controller after actions. 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
addExtension() mixed
getTemplate() Return the template to use for this controller. string|bool
pipe() mixed
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

$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

getModelClassName()

Returns the model name.

public getModelClassName( ) : string
Return values
string

getPageData()

Returns basic page attributes.

public getPageData( ) : array
Return values
array

createProvinceView()

protected createProvinceView( [ $viewName : string = 'ListProvincia' ] ) : mixed
Parameters
$viewName : string = 'ListProvincia'
Return values
mixed

createViews()

Create tabs or views.

protected createViews( ) : mixed
Return values
mixed

loadData()

Loads the data to display.

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

getModelClassName()

Returns the class name of the model to use in the editView.

public abstract getModelClassName( ) : mixed
Return values
mixed

getModel()

Pointer to the data model.

public getModel( ) : mixed
Return values
mixed

getPageData()

Return the basic data for this page.

public getPageData( ) : array
Return values
array

createViews()

Inserts the views or tabs to display.

protected abstract createViews( ) : mixed
Return values
mixed

loadData()

Loads the data to display.

protected abstract loadData( $viewName : string , $view : BaseView ) : mixed
Parameters
$viewName : string
$view : BaseView
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

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

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

addExtension()

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

getTemplate()

Return the template to use for this controller.

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

pipe()

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

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