class ScriptHandler

The ScriptHandler class installs users who can log in to the G6K administration interface and a demonstration simulator (if desired).

It is executed by Composer at the end of the G6K installation. See file composer.json (post-install-cmd)

Methods

static void
installUsers(Event $event)

Users installation:

static void
installDemo(Event $event)

Installation of the demonstration simulator from the files "demo.schema.json" and "demo.json" located in the directory 'src/EUREKA/G6KBundle/Resources/data/databases'.

static array|false
getParameters(Event $event, mixed $configDir)

This function parses the 'parameters.yml' file and returns an array of parameters

Details

at line 59
static void installUsers(Event $event)

Users installation:

  • Creation of the database according to parameters provided in parameters.yml
  • Running the 'fos_user.sql' script in the 'src/EUREKA/G6KBundle/Resources/data/databases' directory. This script contains an 'insert' of two users: admin and guest.

Parameters

Event $event The script event class

Return Value

void

at line 179
static void installDemo(Event $event)

Installation of the demonstration simulator from the files "demo.schema.json" and "demo.json" located in the directory 'src/EUREKA/G6KBundle/Resources/data/databases'.

Parameters

Event $event The script event class

Return Value

void

at line 231
static protected array|false getParameters(Event $event, mixed $configDir)

This function parses the 'parameters.yml' file and returns an array of parameters

Parameters

Event $event The script event class
mixed $configDir the absolute path of the 'app/config' directory

Return Value

array|false parameters array or false in case of error