mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Web: Register hooks provided by the app when bootstrapping
This commit is contained in:
parent
2c67b0db03
commit
7b451a8e3e
@ -6,6 +6,7 @@ namespace Icinga\Application;
|
||||
require_once __DIR__ . '/EmbeddedWeb.php';
|
||||
|
||||
use ErrorException;
|
||||
use Icinga\Application\ProvidedHook\LessVarsLoader;
|
||||
use ipl\I18n\GettextTranslator;
|
||||
use ipl\I18n\Locale;
|
||||
use ipl\I18n\StaticTranslator;
|
||||
@ -101,7 +102,8 @@ class Web extends EmbeddedWeb
|
||||
->setupUser()
|
||||
->setupTimezone()
|
||||
->setupInternationalization()
|
||||
->setupFatalErrorHandling();
|
||||
->setupFatalErrorHandling()
|
||||
->registerApplicationHooks();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -461,6 +463,18 @@ class Web extends EmbeddedWeb
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register all hooks provided by the main application
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
protected function registerApplicationHooks()
|
||||
{
|
||||
Hook::register('Themebuilder\\LessVarsLoader', LessVarsLoader::class, LessVarsLoader::class);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* (non-PHPDoc)
|
||||
* @see ApplicationBootstrap::detectTimezone() For the method documentation.
|
||||
|
Loading…
x
Reference in New Issue
Block a user