FacturaScripts

EditFabricante extends EditFabricante
in package
uses ExtensionsTrait

Class created by Core/Internal/PluginsDeploy

Table of Contents

Constants

MODEL_NAMESPACE  : mixed = '\FacturaScripts\Dinamic\Model\\'

Properties

$active  : string
Indicates the active view.
$codeModel  : CodeModel
Model to use with select and autocomplete filters.
$empresa  : Empresa
Empresa seleccionada.
$exportManager  : ExportManager
Object to export data.
$hasData  : bool
Indicates if the main view has data or is empty.
$multiRequestProtection  : MultiRequestProtection
$permissions  : ControllerPermissions
Permisos del usuario sobre este controlador.
$request  : Request
Petición de la que podemos obtener datos.
$tabsPosition  : string
Tabs position in page: left, bottom.
$title  : string
Título de la página.
$uri  : string
URI dada, por defecto vacía.
$user  : User|false
Usuario que ha iniciado sesión.
$views  : array<string|int, BaseView>
List of views displayed by the controller.
$dataBase  : DataBase
Proporciona acceso directo a la base de datos.
$extensionCache  : array<string|int, mixed>
Cache for extension lookups by method name.
$extensions  : array<string|int, mixed>
Stores class extensions.
$response  : Response
Objeto de respuesta HTTP.

Methods

__call()  : mixed
Executes the first matched extension.
__construct()  : mixed
Starts all the objects and properties.
activeTab()  : BaseView
addButton()  : BaseView
Adds a new button to the tab.
addCustomView()  : BaseView
addExtension()  : void
clearExtensions()  : void
Clears all registered extensions.
getCurrentView()  : BaseView
getExtensions()  : array<string|int, mixed>
Returns a list of all registered extension names.
getImageUrl()  : string
getMainViewName()  : string
Returns the name assigned to the main view
getModel()  : mixed
Pointer to the data model.
getModelClassName()  : string
Returns the class name of the model to use in the editView.
getPageData()  : array<string|int, mixed>
Devuelve los datos básicos de esta página (nombre, título, icono, menú, etc.).
getSettings()  : mixed
Returns the configuration value for the indicated view.
getTemplate()  : string|false
Devuelve la plantilla a usar para este controlador.
getViewModelValue()  : mixed
Return the value for a field in the model of the view.
hasExtension()  : bool
listView()  : ListView
mainTab()  : BaseView
mainTabModelValue()  : mixed
Return the value for a field in the model of the main view.
mainTabName()  : string
Returns the name assigned to the main view
pipe()  : mixed
pipeFalse()  : bool
privateCore()  : mixed
Runs the controller's private logic.
publicCore()  : mixed
Ejecuta la parte pública del controlador.
redirect()  : mixed
Redirige a una url o controlador.
removeExtension()  : bool
Removes all extensions with the specified name.
request()  : Request
run()  : void
setCurrentView()  : void
setSettings()  : BaseView
Set value for setting of a view
setTabsPosition()  : void
Sets the tabs position, by default is set to 'left', also supported 'bottom', 'top' and 'left-bottom'.
setTemplate()  : bool
Establece la plantilla a usar para este controlador.
tab()  : BaseView
tabModelValue()  : mixed
Return the value for a field in the model of the view.
url()  : string
Devuelve la URL del controlador actual.
addEditListView()  : EditListView
Adds a EditList type view to the controller.
addEditView()  : EditView
Adds an Edit type view to the controller.
addHtmlView()  : HtmlView
Adds an HTML type view to the controller.
addListView()  : ListView
Adds a List type view to the controller.
addProductAction()  : void
autocompleteAction()  : array<string|int, mixed>
Run the autocomplete action.
checkOwnerData()  : bool
Returns true if the active user has permission to view the information of the active record in the informed model.
createViewNewProducts()  : void
createViewProducts()  : void
createViewProductsCommon()  : void
createViews()  : mixed
Load views.
datalistAction()  : array<string|int, mixed>
Run the datalist action.
db()  : DataBase
deleteAction()  : bool
Action to delete data.
editAction()  : bool
Runs the data edit action.
execAfterAction()  : mixed
Run the controller after actions.
execPreviousAction()  : bool
Run the actions that alter data before reading it.
exportAction()  : mixed
getAutocompleteValues()  : array<string|int, mixed>
Return values from Widget Values for autocomplete action
getClassName()  : string
Devuelve el nombre del controlador.
insertAction()  : bool
Runs data insert action.
loadData()  : mixed
Load data view procedure
removeProductAction()  : void
requestGet()  : array<string|int, mixed>
Return array with parameters values
response()  : Response
selectAction()  : array<string|int, mixed>
Run the select action.
setCompany()  : void
Selecciona la empresa indicada, salvo que esté vacía o ya sea la cargada.
validateFormToken()  : bool
Comprueba el token de la petición. Devuelve un error si: - el token no existe - el token no es válido - el token está duplicado
widgetLibrarySearchAction()  : array<string|int, mixed>
widgetLibraryUploadAction()  : array<string|int, mixed>
widgetSubcuentaSearchAction()  : array<string|int, mixed>
widgetVarianteSearchAction()  : array<string|int, mixed>
buildExtensionCache()  : void
Builds and caches sorted extensions for a method name.

Constants

MODEL_NAMESPACE

public mixed MODEL_NAMESPACE = '\FacturaScripts\Dinamic\Model\\'

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

$title

Título de la página.

public string $title

título de la página.

$uri

URI dada, por defecto vacía.

public string $uri

$user

Usuario que ha iniciado sesión.

public User|false $user = false

$extensionCache

Cache for extension lookups by method name.

protected static array<string|int, mixed> $extensionCache = []

$extensions

Stores class extensions.

protected static array<string|int, mixed> $extensions = []

Methods

__call()

Executes the first matched extension.

public __call(string $name[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
$name : string
$arguments : array<string|int, mixed> = []
Tags
throws
BadMethodCallException

__construct()

Starts all the objects and properties.

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

addButton()

Adds a new button to the tab.

public addButton(string $viewName, array<string|int, mixed> $btnArray) : BaseView

since 2026. Use $this->tab($viewName)->addButton($btnArray) instead.

Parameters
$viewName : string
$btnArray : array<string|int, mixed>
Return values
BaseView

addExtension()

public static addExtension(mixed $extension[, int $priority = 100 ]) : void
Parameters
$extension : mixed
$priority : int = 100

Priority for all methods in this extension (0-1000, default 100)

clearExtensions()

Clears all registered extensions.

public static clearExtensions() : void

getExtensions()

Returns a list of all registered extension names.

public static getExtensions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getMainViewName()

Returns the name assigned to the main view

public getMainViewName() : string

since 2026. Use $this->mainTabName() instead.

Return values
string

getModelClassName()

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

public getModelClassName() : string
Return values
string

getPageData()

Devuelve los datos básicos de esta página (nombre, título, icono, menú, etc.).

public getPageData() : array<string|int, mixed>

Esta función solamente sirve para eso. No se debe añadir aquí ningún otro código, ya que en este punto el usuario ni siquiera se ha logueado todavía.

Return values
array<string|int, mixed>

getSettings()

Returns the configuration value for the indicated view.

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

getTemplate()

Devuelve la plantilla a usar para este controlador.

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

getViewModelValue()

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

public getViewModelValue(string $viewName, string $fieldName) : mixed

since 2026. Use $this->tabModelValue($viewName, $fieldName) instead.

Parameters
$viewName : string
$fieldName : string

hasExtension()

public hasExtension(mixed $name) : bool
Parameters
$name : mixed
Return values
bool

mainTabModelValue()

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

public mainTabModelValue(string $fieldName) : mixed
Parameters
$fieldName : string

mainTabName()

Returns the name assigned to the main view

public mainTabName() : string
Return values
string

pipe()

public pipe(string $name, array<string|int, mixed> ...$arguments) : mixed
Parameters
$name : string
$arguments : array<string|int, mixed>

pipeFalse()

public pipeFalse(string $name, array<string|int, mixed> ...$arguments) : bool
Parameters
$name : string
$arguments : array<string|int, mixed>
Return values
bool

publicCore()

Ejecuta la parte pública del controlador.

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

redirect()

Redirige a una url o controlador.

public redirect(string $url[, int $delay = 0 ]) : mixed
Parameters
$url : string
$delay : int = 0

removeExtension()

Removes all extensions with the specified name.

public static removeExtension(string $name) : bool
Parameters
$name : string
Return values
bool

True if at least one extension was removed

setCurrentView()

public setCurrentView(string $viewName) : void
Parameters
$viewName : string

setSettings()

Set value for setting of a view

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

setTabsPosition()

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

public setTabsPosition(string $position) : void
Parameters
$position : string

setTemplate()

Establece la plantilla a usar para este controlador.

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

tabModelValue()

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

public tabModelValue(string $viewName, string $fieldName) : mixed
Parameters
$viewName : string
$fieldName : string

url()

Devuelve la URL del controlador actual.

public url() : string
Return values
string

addEditListView()

Adds a EditList type view to the controller.

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

addEditView()

Adds an Edit type view to the controller.

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

addHtmlView()

Adds an HTML type view to the controller.

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

addListView()

Adds a List type view to the controller.

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

autocompleteAction()

Run the autocomplete action.

protected autocompleteAction() : array<string|int, mixed>

Returns a JSON string for the searched values.

Return values
array<string|int, mixed>

checkOwnerData()

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

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

createViewNewProducts()

protected createViewNewProducts([string $viewName = 'ListProducto-new' ]) : void
Parameters
$viewName : string = 'ListProducto-new'

createViewProducts()

protected createViewProducts([string $viewName = 'ListProducto' ]) : void
Parameters
$viewName : string = 'ListProducto'

createViewProductsCommon()

protected createViewProductsCommon(string $viewName) : void
Parameters
$viewName : string

datalistAction()

Run the datalist action.

protected datalistAction() : array<string|int, mixed>

Returns a JSON string for the searched values.

Return values
array<string|int, mixed>

deleteAction()

Action to delete data.

protected deleteAction() : bool
Return values
bool

editAction()

Runs the data edit action.

protected editAction() : bool
Return values
bool

execAfterAction()

Run the controller after actions.

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

execPreviousAction()

Run the actions that alter data before reading it.

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

getAutocompleteValues()

Return values from Widget Values for autocomplete action

protected getAutocompleteValues(string $viewName, string $fieldName) : array<string|int, mixed>
Parameters
$viewName : string
$fieldName : string
Return values
array<string|int, mixed>

getClassName()

Devuelve el nombre del controlador.

protected getClassName() : string
Return values
string

insertAction()

Runs data insert action.

protected insertAction() : bool
Return values
bool

loadData()

Load data view procedure

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

requestGet()

Return array with parameters values

protected requestGet(array<string|int, mixed> $keys) : array<string|int, mixed>
Parameters
$keys : array<string|int, mixed>
Return values
array<string|int, mixed>

selectAction()

Run the select action.

protected selectAction() : array<string|int, mixed>

Returns a JSON string for the searched values.

Return values
array<string|int, mixed>

setCompany()

Selecciona la empresa indicada, salvo que esté vacía o ya sea la cargada.

protected setCompany(int|null $idempresa) : void
Parameters
$idempresa : int|null

validateFormToken()

Comprueba el token de la petición. Devuelve un error si: - el token no existe - el token no es válido - el token está duplicado

protected validateFormToken() : bool
Return values
bool

widgetLibrarySearchAction()

protected widgetLibrarySearchAction() : array<string|int, mixed>
Return values
array<string|int, mixed>

widgetLibraryUploadAction()

protected widgetLibraryUploadAction() : array<string|int, mixed>
Return values
array<string|int, mixed>

widgetSubcuentaSearchAction()

protected widgetSubcuentaSearchAction() : array<string|int, mixed>
Return values
array<string|int, mixed>

widgetVarianteSearchAction()

protected widgetVarianteSearchAction() : array<string|int, mixed>
Return values
array<string|int, mixed>

buildExtensionCache()

Builds and caches sorted extensions for a method name.

private buildExtensionCache(string $name) : void
Parameters
$name : string
On this page

Search results