UserController
extends ControllerBase
in package
Base class of all controllers
Table of Contents
- $messages : array<string|int, mixed>
- Current lang translated texts
- _() : string
- Get a translation by his label in global context
- __() : string
- Get a translation by his label in controller/action context
- beforeExecuteRoute() : void
- Set default view data
- connectAction() : void
- Rest service to connect an user
- disconnectAction() : void
- Disconnect an user and redirect to login page
- loginAction() : void
- Login user action, initialize the form
Properties
$messages
Current lang translated texts
public
array<string|int, mixed>
$messages
= []
Methods
_()
Get a translation by his label in global context
public
_(string $key[, null|array<string|int, mixed> $params = [] ]) : string
Parameters
- $key : string
-
Label of the text
- $params : null|array<string|int, mixed> = []
Tags
Return values
string —Text translated in the correct lang
__()
Get a translation by his label in controller/action context
public
__(string $key[, null|array<string|int, mixed> $params = [] ]) : string
Parameters
- $key : string
-
Label of the text
- $params : null|array<string|int, mixed> = []
Tags
Return values
string —Text translated in the correct lang
beforeExecuteRoute()
Set default view data
public
beforeExecuteRoute(Dispatcher $dispatcher) : void
Parameters
- $dispatcher : Dispatcher
-
Applciation dispatcher
Return values
void —connectAction()
Rest service to connect an user
public
connectAction() : void
Return values
void —disconnectAction()
Disconnect an user and redirect to login page
public
disconnectAction() : void
Return values
void —loginAction()
Login user action, initialize the form
public
loginAction() : void