EditConfig
class EditConfig extends AuthPageController
Controller for editing database and skin settings.
Constants
COOKIE_EXPIRATION_MIN |
Minimum cookie time expiration. |
MENU_DELIMITER |
Symbol to split menu/submenu items. |
Properties
string|null | $username | Contains the user's name or null | from Controller |
string | $shortName | Class short name. | from Controller |
Session | $session | To manage PHP Sessions. | from Controller |
TemplateRender | $renderer | Manage the renderer. | from Controller |
Request | $request | Request from client. | from Controller |
Response | $response | Response to client. | from Controller |
DebugTool | $debugTool | The debug tool used. | from Controller |
Logger | $logger | The logger. | from Controller |
protected Container|null | $container | Contains dependencies. | from Controller |
protected Translator | $translator | The translator manager. | from Controller |
private array | $vars | Array that contains the variables that will be passed to the template. | from Controller |
User | $user | The user logged. | from AuthController |
string|null | $logkey | User log key. | from AuthController |
private string | $defaultRedirect | Page to redirect. | from AuthController |
string | $title | Page title. | from AuthPageController |
string | $icon | Page icon. | from AuthPageController |
string | $description | Page description. | from AuthPageController |
array | $menu | Page menu place. | from AuthPageController |
bool | $canAccess | Can user access? | from AuthPageController |
bool | $canCreate | Can user create? | from AuthPageController |
bool | $canRead | Can user read? | from AuthPageController |
bool | $canUpdate | Can user update? | from AuthPageController |
bool | $canDelete | Can user delete? | from AuthPageController |
bool | $canPrint | Can user print? | from AuthPageController |
bool | $canExport | Can user export? | from AuthPageController |
bool | $canSendMail | Can user send mail? | from AuthPageController |
UserRole[] | $roles | The roles where user is assigned. | from AuthPageController |
string | $url | Contiene la url que se usarĂ¡ en el formulario. | from AuthPageController |
array | $dbEngines | List of engines available. | |
mixed|string | $dbEngineName | Engine in use. | |
array | $skins | List of skins available. | |
$skin | Skin in use. | ||
array | $languages | List of available languages | |
string | $language | Selected language | |
array | $dbConfig | Database config values. | |
string | $timeZone | This installation timezone. | |
array | $timeZones | Contains a list of timezones. | |
array | $regionalConfig | Contains regional information configuration. |
Methods
Add new vars to render, render the template and send the Response.
Send the Response with data received.
Send a RedirectResponse to destiny receive.
Add a new element to a value saved in the array that is passed to the template.
Check if the resource is in the application's resource folder (for example, in the css or js folders of the skin folder). It's a specific file.
Return server and execution environment parameters from $_SERVER values.
Returns the page details.
The start point of the controller.
Default create method for new registers.
Default read method for show an individual register.
Default update method for update an individual register.
Default delete method for delete an individual register.
Returns a list of timezones list with GMT offset
Sets default data values
Save the form changes in the configuration file
Details
in
AuthPageController
at line 128
__construct()
AuthPageController constructor.
in
Controller
at line 135
Response
sendResponseTemplate(array $data = [])
Add new vars to render, render the template and send the Response.
in
Controller
at line 149
Response
sendResponse(string $reply, int $status = Response::HTTP_OK)
Send the Response with data received.
in
Controller
at line 163
RedirectResponse
redirect(string $destiny = '')
Send a RedirectResponse to destiny receive.
in
AuthPageController
at line 212
Response
runMethod(string $methodName)
in
Controller
at line 195
void
addToVar(string $name, mixed $value)
Add a new element to a value saved in the array that is passed to the template.
It is used when what we are saving is an array and we want to add a new element to that array. IMPORTANT: The element only is added if is not empty.
in
Controller
at line 216
string
addResource(string $resourceName, boolean $relative = true)
Check if the resource is in the application's resource folder (for example, in the css or js folders of the skin folder). It's a specific file.
If it can not be found, check if it is in the templates folder (for example in the css or js folders of the templates folder). It's a common file.
If it is not in either of the two, no route is specified (it will surely give loading error).
in
Controller
at line 240
void
addCSS(string $file)
addCSS includes the CSS files to template.
in
Controller
at line 252
void
addJS(string $file)
addJS includes the JS files to template.
in
Controller
at line 262
array
getArrayPost()
Return body parameters $_POST values.
in
Controller
at line 272
array
getArrayGet()
Return query string parameters $_GET values.
in
Controller
at line 282
array
getArrayServer()
Return server and execution environment parameters from $_SERVER values.
in
Controller
at line 292
array
getArrayHeaders()
Return headers from $_SERVER header values.
in
Controller
at line 302
array
getArrayFiles()
Return uploaded files from $_FILES.
in
Controller
at line 312
array
getArrayCookies()
Return cookies from $_COOKIES.
in
AuthController
at line 67
checkAuth()
Check that user is logged in.
in
AuthController
at line 78
private bool
checkLoginWeb()
Check if user is logged-in from Login.
in
AuthController
at line 104
private bool
checkLoginAPI()
Check if user is logged-in from API.
in
AuthController
at line 127
private
adjustCookieUser(int $time = 0, int $remember = 0)
Adjust auth cookie user.
in
AuthController
at line 147
RedirectResponse
logout()
Close the user session and go to the main page
in
AuthPageController
at line 142
protected void
setPageDetails()
Set the page details.
at line 101
array
pageDetails()
Returns the page details.
at line 148
Response
indexMethod()
The start point of the controller.
at line 137
Response
createMethod()
Default create method for new registers.
at line 269
Response
readMethod()
Default read method for show an individual register.
at line 280
Response
updateMethod()
Default update method for update an individual register.
at line 291
Response
deleteMethod()
Default delete method for delete an individual register.
in
AuthPageController
at line 276
private
loadPerms()
Load perms for this user.
in
AuthPageController
at line 300
private bool
canAction(string $action)
Verify if this user can do an action.
in
AuthPageController
at line 337
array
getUserMenu()
Return a list of pages for generate user menu.
in
AuthPageController
at line 364
protected array
getPageDetails()
Returns the page details as array.
at line 120
array
getTimezoneList()
Returns a list of timezones list with GMT offset
at line 181
private
setDefaultData()
Sets default data values
at line 214
private bool
save()
Save the form changes in the configuration file