FacturaScripts

EditPageOption extends Controller
in package

Edit option for any page.

Tags

Jose Antonio Cuello [email protected]

Fco. Antonio Moreno Pérez [email protected]

Table of Contents

Properties

$backPage  : string
Contains the url to go back.
$columns  : array<string|int, mixed>
$empresa  : Empresa
Empresa seleccionada.
$modals  : array<string|int, mixed>
$model  : PageOption
Details of the view configuration
$multiRequestProtection  : MultiRequestProtection
$permissions  : ControllerPermissions
Permisos del usuario sobre este controlador.
$request  : Request
Petición de la que podemos obtener datos.
$rows  : array<string|int, mixed>
$selectedUser  : string
Selected user, for which the controller columns are created or modified
$selectedViewName  : string
Selected view, for which columns are created or modified
$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.
$dataBase  : DataBase
Proporciona acceso directo a la base de datos.
$response  : Response
Objeto de respuesta HTTP.

Methods

__construct()  : mixed
Inicializa todos los objetos y propiedades.
addExtension()  : mixed
getPageData()  : array<string|int, mixed>
Devuelve los datos básicos de esta página (nombre, título, icono, menú, etc.).
getTemplate()  : string|false
Devuelve la plantilla a usar para este controlador.
getUserList()  : array<string|int, mixed>
Get the list of users, excluding the user admin
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.
request()  : Request
run()  : void
setTemplate()  : bool
Establece la plantilla a usar para este controlador.
url()  : string
Devuelve la URL del controlador actual.
db()  : DataBase
deleteAction()  : void
Delete configuration for view
getClassName()  : string
Devuelve el nombre del controlador.
loadPageOptions()  : void
Load the display options to edit.
loadSelectedViewName()  : void
response()  : Response
saveAction()  : void
Save new configuration for view
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
loadPageOptionsForAll()  : bool
Loads the general display options for all users, and indicates if they exist or not.
loadPageOptionsForUser()  : bool
Loads the display options specific to the user.
setBackPage()  : void
setColumnOption()  : void

Properties

$selectedUser

Selected user, for which the controller columns are created or modified

public string $selectedUser

$selectedViewName

Selected view, for which columns are created or modified

public string $selectedViewName

$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

Methods

__construct()

Inicializa todos los objetos y propiedades.

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

addExtension()

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

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>

getTemplate()

Devuelve la plantilla a usar para este controlador.

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

getUserList()

Get the list of users, excluding the user admin

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

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

setTemplate()

Establece la plantilla a usar para este controlador.

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

url()

Devuelve la URL del controlador actual.

public url() : string
Return values
string

deleteAction()

Delete configuration for view

protected deleteAction() : void

getClassName()

Devuelve el nombre del controlador.

protected getClassName() : string
Return values
string

loadPageOptions()

Load the display options to edit.

protected loadPageOptions() : void

If it does not find them in the database, it loads the default options of the xml view.

saveAction()

Save new configuration for view

protected saveAction() : void

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

loadPageOptionsForAll()

Loads the general display options for all users, and indicates if they exist or not.

private loadPageOptionsForAll() : bool
Return values
bool

loadPageOptionsForUser()

Loads the display options specific to the user.

private loadPageOptionsForUser() : bool

If they do not exist, look for the display options common to all users. In either case, it indicates whether it has found a configuration.

Return values
bool

setColumnOption()

private setColumnOption(array<string|int, mixed> &$column, string $name, string $key, bool $isWidget, bool $allowEmpty) : void
Parameters
$column : array<string|int, mixed>
$name : string
$key : string
$isWidget : bool
$allowEmpty : bool
On this page

Search results