FacturaScripts

EditPageOption extends Controller
in package

Edit option for any page.

Tags
author

Carlos García Gómez [email protected]

author

Jose Antonio Cuello [email protected]

author

Fco. Antonio Moreno Pérez [email protected]

Table of Contents

$backPage  : string
Contains the url to go back.
$columns  : array<string|int, mixed>
$empresa  : Empresa
Selected company.
$modals  : array<string|int, mixed>
$model  : PageOption
Details of the view configuration
$multiRequestProtection  : MultiRequestProtection
$permissions  : ControllerPermissions
User permissions on this controller.
$request  : Request
Request on which we can get data.
$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
Title of the page.
$uri  : string
Given uri, default is empty.
$user  : User|false
User logged in.
$dataBase  : DataBase
It provides direct access to the database.
$response  : Response
HTTP Response object.
$className  : string
Name of the class of the controller (although its in inheritance from this class, the name of the final class we will have here)
$template  : string|false
Name of the file for the template.
__construct()  : mixed
Initialize all objects and properties.
addExtension()  : mixed
getPageData()  : array<string|int, mixed>
Return the basic data for this page.
getTemplate()  : string|false
Return the template to use for this controller.
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
Execute the public part of the controller.
redirect()  : mixed
Redirect to an url or controller.
run()  : void
setTemplate()  : bool
Set the template to use for this controller.
toolBox()  : ToolBox
url()  : string
Return the URL of the actual controller.
deleteAction()  : mixed
Delete configuration for view
getClassName()  : string
Return the name of the controller.
loadPageOptions()  : mixed
Load the display options to edit.
loadSelectedViewName()  : mixed
saveAction()  : mixed
Save new configuration for view
validateFormToken()  : bool
Check request token. Returns an error if: - the token does not exist - the token is invalid - the token is duplicated
auth()  : bool
checkPhpVersion()  : void
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()  : mixed
setColumnOption()  : mixed

Properties

$request

Request on which we can get data.

public Request $request

$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

Title of the page.

public string $title

título de la página.

$uri

Given uri, default is empty.

public string $uri

$response

HTTP Response object.

protected Response $response

$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

CLASS

$template

Name of the file for the template.

private string|false $template

nombre_archivo.html.twig

Methods

__construct()

Initialize all objects and properties.

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

addExtension()

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

getPageData()

Return the basic data for this page.

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

getTemplate()

Return the template to use for this controller.

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>
Return values
mixed

pipeFalse()

public pipeFalse(string $name, array<string|int, mixed> ...$arguments) : bool
Parameters
$name : string
$arguments : array<string|int, mixed>
Return values
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(string $url, int $delay) : mixed
Parameters
$url : string
$delay : int
Return values
mixed

run()

public run() : void
Return values
void

setTemplate()

Set the template to use for this controller.

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

url()

Return the URL of the actual controller.

public url() : string
Return values
string

deleteAction()

Delete configuration for view

protected deleteAction() : mixed
Return values
mixed

getClassName()

Return the name of the controller.

protected getClassName() : string
Return values
string

loadPageOptions()

Load the display options to edit.

protected loadPageOptions() : mixed

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

Return values
mixed

loadSelectedViewName()

protected loadSelectedViewName() : mixed
Return values
mixed

saveAction()

Save new configuration for view

protected saveAction() : mixed
Return values
mixed

validateFormToken()

Check request token. Returns an error if: - the token does not exist - the token is invalid - the token is duplicated

protected validateFormToken() : bool
Return values
bool

auth()

private auth() : bool
Return values
bool

checkPhpVersion()

private checkPhpVersion(float $min) : void
Parameters
$min : float
Return values
void

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

setBackPage()

private setBackPage() : mixed
Return values
mixed

setColumnOption()

private setColumnOption(array<string|int, mixed> &$column, string $name, string $key, bool $isWidget, bool $allowEmpty) : mixed
Parameters
$column : array<string|int, mixed>
$name : string
$key : string
$isWidget : bool
$allowEmpty : bool
Return values
mixed

Search results