mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-25 18:59:04 +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';
|
require_once __DIR__ . '/EmbeddedWeb.php';
|
||||||
|
|
||||||
use ErrorException;
|
use ErrorException;
|
||||||
|
use Icinga\Application\ProvidedHook\LessVarsLoader;
|
||||||
use ipl\I18n\GettextTranslator;
|
use ipl\I18n\GettextTranslator;
|
||||||
use ipl\I18n\Locale;
|
use ipl\I18n\Locale;
|
||||||
use ipl\I18n\StaticTranslator;
|
use ipl\I18n\StaticTranslator;
|
||||||
@ -101,7 +102,8 @@ class Web extends EmbeddedWeb
|
|||||||
->setupUser()
|
->setupUser()
|
||||||
->setupTimezone()
|
->setupTimezone()
|
||||||
->setupInternationalization()
|
->setupInternationalization()
|
||||||
->setupFatalErrorHandling();
|
->setupFatalErrorHandling()
|
||||||
|
->registerApplicationHooks();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -461,6 +463,18 @@ class Web extends EmbeddedWeb
|
|||||||
return $this;
|
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)
|
* (non-PHPDoc)
|
||||||
* @see ApplicationBootstrap::detectTimezone() For the method documentation.
|
* @see ApplicationBootstrap::detectTimezone() For the method documentation.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user