FacturaScripts

Wizard extends Wizard
in package
Uses ExtensionsTrait

Class created by Core/Base/PluginManager

Tags
author

FacturaScripts [email protected]

Table of Contents

ITEM_SELECT_LIMIT  = 500
NEW_DEFAULT_PAGE  = 'Dashboard'
$empresa  : Empresa
Selected company.
$multiRequestProtection  : MultiRequestProtection
$permissions  : ControllerPermissions
User permissions on this controller.
$request  : Request
Request on which we can get data.
$title  : string
Title of the page.
$uri  : string
Given uri, default is empty.
$user  : User|false
User logged in.
$appSettings  : AppSettings
$dataBase  : DataBase
It provides direct access to the database.
$extensions  : array<string|int, mixed>
Stores class extensions.
$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.
__call()  : mixed
Executes the first matched extension.
__construct()  : mixed
Initialize all objects and properties.
addExtension()  : mixed
getPageData()  : array<string|int, mixed>
Return the basic data for this page.
getRegimenIva()  : array<string|int, mixed>
getSelectValues()  : array<string|int, mixed>
Returns an array with all data from selected model.
getTemplate()  : string|false
Return the template to use for this controller.
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.
setTemplate()  : bool
Set the template to use for this controller.
toolBox()  : ToolBox
url()  : string
Return the URL of the actual controller.
finalRedirect()  : mixed
getClassName()  : string
Return the name of the controller.
saveStep3()  : mixed
validateFormToken()  : bool
Check request token. Returns an error if: - the token does not exist - the token is invalid - the token is duplicated
addDefaultRoleAccess()  : void
Add/update the default role for agents, and adds to this role access to all default pages.
addPagesToRole()  : void
Adds to received codrole, all pages that are not in admin menu and are not yet enabled.
checkPHPversion()  : mixed
initModels()  : mixed
Initialize required models.
loadDefaultAccountingPlan()  : void
Loads the default accounting plan. If there is one.
preSetAppSettings()  : mixed
Set default AppSettings based on codpais
saveAddress()  : mixed
Save company default address.
saveEmail()  : bool
saveNewPassword()  : bool
Save the new password if data is admin admin
saveStep1()  : mixed
saveStep2()  : mixed
setWarehouse()  : void

Constants

ITEM_SELECT_LIMIT

public mixed ITEM_SELECT_LIMIT = 500

NEW_DEFAULT_PAGE

public mixed NEW_DEFAULT_PAGE = 'Dashboard'

Properties

$request

Request on which we can get data.

public Request $request

$title

Title of the page.

public string $title

título de la página.

$uri

Given uri, default is empty.

public string $uri

$extensions

Stores class extensions.

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

$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

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

__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>

getRegimenIva()

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

getSelectValues()

Returns an array with all data from selected model.

public getSelectValues(string $modelName[, bool $addEmpty = false ]) : array<string|int, mixed>
Parameters
$modelName : string
$addEmpty : bool = false
Return values
array<string|int, mixed>

getTemplate()

Return the template to use for this controller.

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

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

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

finalRedirect()

protected finalRedirect() : mixed
Return values
mixed

getClassName()

Return the name of the controller.

protected getClassName() : string
Return values
string

saveStep3()

protected saveStep3() : 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

addDefaultRoleAccess()

Add/update the default role for agents, and adds to this role access to all default pages.

private addDefaultRoleAccess() : void
Return values
void

addPagesToRole()

Adds to received codrole, all pages that are not in admin menu and are not yet enabled.

private addPagesToRole(string $codrole) : void
Parameters
$codrole : string
Return values
void

checkPHPversion()

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

initModels()

Initialize required models.

private initModels(array<string|int, mixed> $names) : mixed
Parameters
$names : array<string|int, mixed>
Return values
mixed

loadDefaultAccountingPlan()

Loads the default accounting plan. If there is one.

private loadDefaultAccountingPlan(string $codpais) : void
Parameters
$codpais : string
Return values
void

preSetAppSettings()

Set default AppSettings based on codpais

private preSetAppSettings(string $codpais) : mixed
Parameters
$codpais : string
Return values
mixed

saveAddress()

Save company default address.

private saveAddress(string $codpais) : mixed
Parameters
$codpais : string
Return values
mixed

saveEmail()

private saveEmail(string $email) : bool
Parameters
$email : string
Return values
bool

saveNewPassword()

Save the new password if data is admin admin

private saveNewPassword(string $pass) : bool
Parameters
$pass : string
Return values
bool

Returns true if success, otherwise return false.

saveStep1()

private saveStep1() : mixed
Return values
mixed

saveStep2()

private saveStep2() : mixed
Return values
mixed

setWarehouse()

private setWarehouse(Almacen $almacen, string $codpais) : void
Parameters
$almacen : Almacen
$codpais : string
Return values
void

Search results