class BaseAdminController extends AbstractController

Base class for all the admin module controllers

Properties

protected mixed $projectDir
protected mixed $translator
protected mixed $kernel
protected mixed $userManager
protected mixed $authorizationChecker
protected mixed $fileUploader
protected mixed $deployer
string $databasesDir
string $simulatorsDir
string $publicDir
string $viewsDir

Methods

void
__construct(TranslatorInterface $translator, KernelInterface $kernel, AuthorizationCheckerInterface $authorizationChecker, UserManagerInterface $userManager, FileUploader $fileUploader, Deployer $deployer, mixed $projectDir)

Constructor of class BaseAdminController

Response
errorResponse(array $form, string $error)

Returns a JSON response formed with the data of a form and an error message.

zip(array $contents)

Zip file creation function.

int
unix2DosTime(int $unixtime = 0)

Converts unix time to MS DOS time

Details

at line 150
void __construct(TranslatorInterface $translator, KernelInterface $kernel, AuthorizationCheckerInterface $authorizationChecker, UserManagerInterface $userManager, FileUploader $fileUploader, Deployer $deployer, mixed $projectDir)

Constructor of class BaseAdminController

Parameters

TranslatorInterface $translator
KernelInterface $kernel
AuthorizationCheckerInterface $authorizationChecker
UserManagerInterface $userManager
FileUploader $fileUploader
Deployer $deployer
mixed $projectDir

Return Value

void

at line 169
protected Response errorResponse(array $form, string $error)

Returns a JSON response formed with the data of a form and an error message.

Parameters

array $form The form fields
string $error The error message

Return Value

Response

at line 189
protected zip(array $contents)

Zip file creation function.

Makes zip files. Derivated from PhpMyAdmin package The $contents parameter is an array of associative array where keys are : - name: name of the zip - modtime: modification time - data: data to compress

Parameters

array $contents The array of contents to be compressed

See also

Official ZIP file format: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

at line 264
protected int unix2DosTime(int $unixtime = 0)

Converts unix time to MS DOS time

Parameters

int $unixtime (default: 0) The unix time

Return Value

int The MS DOS time