HomeAdminController
class HomeAdminController extends BaseAdminController
The HomeAdminController class is the controller that display the administration interface homepage.
Traits
Properties
protected mixed | $projectDir | from BaseAdminController | |
protected mixed | $translator | from BaseAdminController | |
protected mixed | $kernel | from BaseAdminController | |
protected mixed | $userManager | from BaseAdminController | |
protected mixed | $authorizationChecker | from BaseAdminController | |
protected mixed | $fileUploader | from BaseAdminController | |
protected mixed | $deployer | from BaseAdminController | |
string | $databasesDir | from BaseAdminController | |
string | $simulatorsDir | from BaseAdminController | |
string | $publicDir | from BaseAdminController | |
string | $viewsDir | from BaseAdminController | |
private SimpleXMLElement | $datasources |
Methods
Constructor of class BaseAdminController
Returns a JSON response formed with the data of a form and an error message.
Returns the browser engine from the user agent
Populates the list of values of a data item of type choice from a data source.
Populates the list of values of a data item of type choice from a data source where columns are in the given ChoiceSource object.
Returns the formatted value of the data item where the ID is in the first element of the given array.
Replaces all data ID by their corresponding value into the given text.
Prefix with a # and returns the prefixed ID of the data item where the ID is in the first element of the given array.
Replaces all the html tag data containing the ID of a data item by # followed by the ID
Composes a footnote reference string [text^ID(title)] with the elements of the given array.
Replaces all the html tag dfn containing the ID of a footnote by [text^ID(title)]
Replaces all the html tag dfn and data with their text equivalent
Returns the list of available widgets by type (g6k type).
Returns the list of available widgets by form input type.
Retrieves the Data object of a data item of the current simulator by its ID.
Retrieves an action node by its name in the actions tree from the supplied node
Retrieves an action field node in the given fields list for the given current option node
Retrieves an action field option node by its value in the field list of the given action node
Makes a date string from an array [year, month, day], according to the date format.
Return a relative path to a file or directory using base directory.
Run a console command.
Run a streamed console command.
Determines whether the symfony kernel is in development mode or not.
Entry point of the root path /admin
Prepare the administration interface homepage and renders it.
Details
in BaseAdminController at line 150
void
__construct(TranslatorInterface $translator, KernelInterface $kernel, AuthorizationCheckerInterface $authorizationChecker, UserManagerInterface $userManager, FileUploader $fileUploader, Deployer $deployer, mixed $projectDir)
Constructor of class BaseAdminController
in BaseAdminController 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.
in BaseAdminController 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
in BaseAdminController at line 264
protected int
unix2DosTime(int $unixtime = 0)
Converts unix time to MS DOS time
in ControllersTrait at line 66
protected void
initialize()
Initialization of common directories
in ControllersTrait at line 81
KernelInterface
getKernel()
Returns the Symfony kernel
in ControllersTrait at line 92
TranslatorInterface
getTranslator()
Returns the translator interface
in ControllersTrait at line 103
bool
hasParameter($parameters)
Checks if a parameter exists or not
in ControllersTrait at line 119
string
getLocale()
Returns the 'locale' from config parameters
in ControllersTrait at line 130
string
getLanguage()
Returns the 'app_language' from config parameters
in ControllersTrait at line 142
protected string
getBrowserEngine(Request $request)
Returns the browser engine from the user agent
in ControllersTrait at line 187
protected string|null
formatParamValue(Parameter $param)
Formats a source parameter value
in ControllersTrait at line 247
protected DataSource
getDatasource(Source $source)
Returns the data source accessed by a source query
in ControllersTrait at line 265
mixed
processSource(Source $source)
Process a source query and returns the result of that query.
in ControllersTrait at line 442
void
populateChoiceWithSource(Data $data)
Populates the list of values of a data item of type choice from a data source.
in ControllersTrait at line 466
protected void
populateChoice(Data $data, ChoiceSource $choiceSource)
Populates the list of values of a data item of type choice from a data source where columns are in the given ChoiceSource object.
in ControllersTrait at line 505
protected string
replaceVariable(array $matches)
Returns the formatted value of the data item where the ID is in the first element of the given array.
If the second element of the given array is 'L' and if the data item is a choice, the label is returned instead of the value.
in ControllersTrait at line 559
RichText|string
replaceVariables(RichText|string $target)
Replaces all data ID by their corresponding value into the given text.
in ControllersTrait at line 587
protected string
replaceDataTag(array $matches)
Prefix with a # and returns the prefixed ID of the data item where the ID is in the first element of the given array.
in ControllersTrait at line 604
RichText|string
replaceDataTagByVariable(RichText|string $target)
Replaces all the html tag data containing the ID of a data item by # followed by the ID
in ControllersTrait at line 627
protected string
replaceDfnTag(array $matches)
Composes a footnote reference string [text^ID(title)] with the elements of the given array.
in ControllersTrait at line 643
RichText|string
replaceDfnTagByFootnote(RichText|string $target)
Replaces all the html tag dfn containing the ID of a footnote by [text^ID(title)]
in ControllersTrait at line 666
string
replaceSpecialTags(string $target)
Replaces all the html tag dfn and data with their text equivalent
in ControllersTrait at line 679
array
getWidgets()
Returns the list of available widgets.
in ControllersTrait at line 696
array
getWidgetsByType()
Returns the list of available widgets by type (g6k type).
in ControllersTrait at line 726
array
getWidgetsByInputType()
Returns the list of available widgets by form input type.
in ControllersTrait at line 756
array
getFunctions()
Returns the label of available functions.
in ControllersTrait at line 783
Data|null
getDataById(int $id)
Retrieves the Data object of a data item of the current simulator by its ID.
in ControllersTrait at line 796
array|null
findAction(string $name, array $fromNode)
Retrieves an action node by its name in the actions tree from the supplied node
in ControllersTrait at line 814
array|null
findActionField(array $fields, array $currentNode)
Retrieves an action field node in the given fields list for the given current option node
in ControllersTrait at line 837
array|null
findActionOption(string $name, string $value, array $node)
Retrieves an action field option node by its value in the field list of the given action node
in ControllersTrait at line 860
protected string|null
makeDateString(array $dateArray)
Makes a date string from an array [year, month, day], according to the date format.
in ControllersTrait at line 898
private String
getRelativePath(String $base, String $path)
Return a relative path to a file or directory using base directory.
in ControllersTrait at line 916
private bool
runConsoleCommand(array $command, array|null $report = null)
Run a console command.
in ControllersTrait at line 954
private StreamedResponse
runStreamedConsoleCommand(array $command, callable $start, callable $end)
Run a streamed console command.
in ControllersTrait at line 980
bool
isDevelopmentEnvironment()
Determines whether the symfony kernel is in development mode or not.
in ControllersTrait at line 991
string
getEnvironment()
Returns the current environment
at line 61
Response
index(Request $request)
Entry point of the root path /admin
at line 75
protected Response
runIndex(Request $request)
Prepare the administration interface homepage and renders it.