diff --git a/library/Icinga/Application/Web.php b/library/Icinga/Application/Web.php index 4ce9b45a6..faff16b2d 100644 --- a/library/Icinga/Application/Web.php +++ b/library/Icinga/Application/Web.php @@ -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.