Files
nextcloud_minimalprofile/lib/AppInfo/Application.php

36 lines
934 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace OCA\MinimalProfile\AppInfo;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
2026-04-16 14:34:08 +02:00
use OCP\AppFramework\Http\TemplateResponse;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
class Application extends App implements IBootstrap {
public const APP_ID = 'minimalprofile';
public function __construct(array $urlParams = []) {
parent::__construct(self::APP_ID, $urlParams);
}
public function register(IRegistrationContext $context): void {
2026-04-16 14:34:08 +02:00
$context->registerEventListener(
TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS,
function(Event $event) {
if ($event instanceof TemplateResponse) {
$event->getStyleSheet()->load('minimalprofile', 'minimalprofile');
}
}
);
}
public function boot(IBootContext $context): void {
}
}