From 01996b48f16b4c106aa920348892b54945b31bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 4 Apr 2022 18:24:36 +0200 Subject: Move to IBootstrap (fixes #105) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- appinfo/app.php | 25 ------------------- lib/AppInfo/Application.php | 32 +++++++++++++++++++++++++ lib/Listener/BeforeTemplateRenderedListener.php | 16 +++++++++++++ 3 files changed, 48 insertions(+), 25 deletions(-) delete mode 100644 appinfo/app.php create mode 100644 lib/AppInfo/Application.php create mode 100644 lib/Listener/BeforeTemplateRenderedListener.php diff --git a/appinfo/app.php b/appinfo/app.php deleted file mode 100644 index 688afc9..0000000 --- a/appinfo/app.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * @author Julius Härtl - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -\OCP\Util::addStyle('apporder', 'apporder'); -\OCP\Util::addScript('apporder', 'apporder'); diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php new file mode 100644 index 0000000..62d362b --- /dev/null +++ b/lib/AppInfo/Application.php @@ -0,0 +1,32 @@ +registerEventListener(BeforeTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class); + } + + /** + * @inheritDoc + */ + public function boot(IBootContext $context): void { + } +} diff --git a/lib/Listener/BeforeTemplateRenderedListener.php b/lib/Listener/BeforeTemplateRenderedListener.php new file mode 100644 index 0000000..7f4aaed --- /dev/null +++ b/lib/Listener/BeforeTemplateRenderedListener.php @@ -0,0 +1,16 @@ +