Files
nextcloud_minimalprofile/lib/AppInfo/Application.php

36 lines
1008 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;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\Util;
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 16:12:35 +02:00
// Register event listener - this fires on EVERY page render after template is built
$context->registerEventListener(
TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS,
function() {
Util::addStyle('minimalprofile', 'minimalprofile');
}
);
2026-04-16 16:12:35 +02:00
file_put_contents('/tmp/minimalprofile.log', date('Y-m-d H:i:s') . ' register, event registered' . "\n", FILE_APPEND);
}
public function boot(IBootContext $context): void {
2026-04-16 14:50:02 +02:00
}
}