$this->mode,
$this->config,
$this->profiler,
+ $this->container->create(EventDispatcherInterface::class),
$this->appHelper,
+ $addonHelper,
);
$this->registerTemplateEngine();
$this->container->create(Mode::class),
$this->container->create(IManageConfigValues::class),
$this->container->create(Profiler::class),
+ $this->container->create(EventDispatcherInterface::class),
$this->container->create(AppHelper::class),
+ $this->container->create(AddonHelper::class),
);
$this->registerTemplateEngine();
$this->container->create(Mode::class),
$this->container->create(IManageConfigValues::class),
$this->container->create(Profiler::class),
+ $this->container->create(EventDispatcherInterface::class),
$this->container->create(AppHelper::class),
+ $this->container->create(AddonHelper::class),
);
/** @var BasePath */
Mode $mode,
IManageConfigValues $config,
Profiler $profiler,
- AppHelper $appHelper
+ EventDispatcherInterface $eventDispatcher,
+ AppHelper $appHelper,
+ AddonHelper $addonHelper
): void {
if ($config->get('system', 'ini_max_execution_time') !== false) {
set_time_limit((int) $config->get('system', 'ini_max_execution_time'));
if ($mode->has(Mode::DBAVAILABLE)) {
Core\Hook::loadHooks();
- $loader = (new Config())->createConfigFileManager($appHelper->getBasePath(), $serverParams);
+ $loader = (new Config())->createConfigFileManager($appHelper->getBasePath(), $addonHelper->getAddonPath(), $serverParams);
- Core\Hook::callAll('load_config', $loader);
+
+ $eventDispatcher->dispatch(new ConfigLoadedEvent(ConfigLoadedEvent::CONFIG_LOADED, $loader));
// Hooks are now working, reload the whole definitions with hook enabled
$dbaDefinition->load(true);