v1.0.18 - PHP loads CSS and JS via event
This commit is contained in:
@@ -8,6 +8,8 @@ use OCP\AppFramework\App;
|
||||
use OCP\AppFramework\Bootstrap\IBootContext;
|
||||
use OCP\AppFramework\Bootstrap\IBootstrap;
|
||||
use OCP\AppFramework\Bootstrap\IRegistrationContext;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\Util;
|
||||
|
||||
class Application extends App implements IBootstrap {
|
||||
|
||||
@@ -18,6 +20,13 @@ class Application extends App implements IBootstrap {
|
||||
}
|
||||
|
||||
public function register(IRegistrationContext $context): void {
|
||||
$context->registerEventListener(
|
||||
TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS,
|
||||
function() {
|
||||
Util::addStyle('minimalprofile', 'minimalprofile');
|
||||
Util::addScript('minimalprofile', 'minimalprofile');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public function boot(IBootContext $context): void {
|
||||
|
||||
Reference in New Issue
Block a user