Dashboard
extends Controller
in package
Description of Dashboard
Tags
Table of Contents
Properties
- $createLinks : array<string|int, mixed>
- $empresa : Empresa
- Empresa seleccionada.
- $firstSteps : array<string|int, mixed>
- $firstStepsCompleted : int
- $isOnboarding : bool
- $lowStock : array<string|int, mixed>
- $lowStockCount : int
- $multiRequestProtection : MultiRequestProtection
- $news : array<string|int, mixed>
- $openLinks : array<string|int, mixed>
- $permissions : ControllerPermissions
- Permisos del usuario sobre este controlador.
- $receiptCount : int
- $receipts : array<string|int, mixed>
- $registered : bool
- $request : Request
- Petición de la que podemos obtener datos.
- $sections : array<string|int, mixed>
- $statChanges : array<string|int, mixed>
- $stats : array<string|int, mixed>
- $title : string
- Título de la página.
- $updated : bool
- $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.
- pipe() : mixed
- pipeFalse() : bool
- privateCore() : void
- 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.
- showBackupWarning() : bool
- url() : string
- Devuelve la URL del controlador actual.
- db() : DataBase
- getClassName() : string
- Devuelve el nombre del controlador.
- response() : Response
- 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
- getMonthlyCustomerTotals() : array<string|int, mixed>
- getMonthlyDocumentTotals() : array<string|int, mixed>
- getStatsDates() : array<string|int, mixed>
- loadCreateLinks() : void
- Set the quick links for data creation.
- loadExtensions() : void
- Establish the sections to be displayed on the dashboard.
- loadFirstSteps() : void
- loadLowStockSection() : void
- Load the data regarding the stock under minimum.
- loadNews() : void
- Load last news from facturascripts.com
- loadOpenLinks() : void
- Loads the links to the latest data created by the user.
- loadReceiptSection() : void
- Load the receipts pending collection.
- loadStats() : void
- Load statistical data.
- setOpenLinksForDocument() : void
- setStats() : void
Properties
$createLinks
public
array<string|int, mixed>
$createLinks
= []
$empresa
Empresa seleccionada.
public
Empresa
$empresa
$firstSteps
public
array<string|int, mixed>
$firstSteps
= []
$firstStepsCompleted
public
int
$firstStepsCompleted
= 0
$isOnboarding
public
bool
$isOnboarding
= false
$lowStock
public
array<string|int, mixed>
$lowStock
= []
$lowStockCount
public
int
$lowStockCount
= 0
$multiRequestProtection
public
MultiRequestProtection
$multiRequestProtection
$news
public
array<string|int, mixed>
$news
= []
$openLinks
public
array<string|int, mixed>
$openLinks
= []
$permissions
Permisos del usuario sobre este controlador.
public
ControllerPermissions
$permissions
$receiptCount
public
int
$receiptCount
= 0
$receipts
public
array<string|int, mixed>
$receipts
= []
$registered
public
bool
$registered
= false
$request
Petición de la que podemos obtener datos.
public
Request
$request
$sections
public
array<string|int, mixed>
$sections
= []
$statChanges
public
array<string|int, mixed>
$statChanges
= []
$stats
public
array<string|int, mixed>
$stats
= []
$title
Título de la página.
public
string
$title
título de la página.
$updated
public
bool
$updated
= false
$uri
URI dada, por defecto vacía.
public
string
$uri
$user
Usuario que ha iniciado sesión.
public
User|false
$user
= false
$dataBase
Proporciona acceso directo a la base de datos.
protected
DataBase
$dataBase
$response
Objeto de respuesta HTTP.
protected
Response
$response
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|falsepipe()
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
boolprivateCore()
Runs the controller's private logic.
public
privateCore(Response &$response, User $user, ControllerPermissions $permissions) : void
Parameters
- $response : Response
- $user : User
- $permissions : ControllerPermissions
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
request()
public
request() : Request
Return values
Requestrun()
public
run() : void
setTemplate()
Establece la plantilla a usar para este controlador.
public
setTemplate(string|false $template) : bool
Parameters
- $template : string|false
Return values
boolshowBackupWarning()
public
showBackupWarning() : bool
Return values
boolurl()
Devuelve la URL del controlador actual.
public
url() : string
Return values
stringdb()
protected
db() : DataBase
Return values
DataBasegetClassName()
Devuelve el nombre del controlador.
protected
getClassName() : string
Return values
stringresponse()
protected
response() : Response
Return values
ResponsesetCompany()
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
boolgetMonthlyCustomerTotals()
private
getMonthlyCustomerTotals() : array<string|int, mixed>
Return values
array<string|int, mixed>getMonthlyDocumentTotals()
private
getMonthlyDocumentTotals(string $tableName, string $pageName) : array<string|int, mixed>
Parameters
- $tableName : string
- $pageName : string
Return values
array<string|int, mixed>getStatsDates()
private
getStatsDates() : array<string|int, mixed>
Return values
array<string|int, mixed>loadCreateLinks()
Set the quick links for data creation.
private
loadCreateLinks() : void
Example: createLinks['EditControllerName'] = 'label'
loadExtensions()
Establish the sections to be displayed on the dashboard.
private
loadExtensions() : void
loadFirstSteps()
private
loadFirstSteps() : void
loadLowStockSection()
Load the data regarding the stock under minimum.
private
loadLowStockSection() : void
loadNews()
Load last news from facturascripts.com
private
loadNews() : void
loadOpenLinks()
Loads the links to the latest data created by the user.
private
loadOpenLinks() : void
loadReceiptSection()
Load the receipts pending collection.
private
loadReceiptSection() : void
loadStats()
Load statistical data.
private
loadStats() : void
setOpenLinksForDocument()
private
setOpenLinksForDocument(BusinessDocument $model, string $label, string $pageName) : void
Parameters
- $model : BusinessDocument
- $label : string
- $pageName : string
setStats()
private
setStats(string $group, float $current, float $previous) : void
Parameters
- $group : string
- $current : float
- $previous : float