diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2024-12-17 20:11:19 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2024-12-18 12:50:11 +0100 |
commit | 13fefc4612f1f894bef95c4b061058196d68a9f2 (patch) | |
tree | 833b62cb37cd30bdf489e2a51666720c1bdbd099 /lib | |
parent | fe90aa3ffe0a8127a92cf0226333c44ed5b793dc (diff) | |
download | nextcloud-server-13fefc4612f1f894bef95c4b061058196d68a9f2.tar.gz nextcloud-server-13fefc4612f1f894bef95c4b061058196d68a9f2.zip |
feat(Navigation): emit dedicated event for loading additional entriesenh/noid/navigationentryevent
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/composer/composer/autoload_classmap.php | 1 | ||||
-rw-r--r-- | lib/composer/composer/autoload_static.php | 1 | ||||
-rw-r--r-- | lib/private/NavigationManager.php | 4 | ||||
-rw-r--r-- | lib/public/Navigation/Events/LoadAdditionalEntriesEvent.php | 17 |
4 files changed, 23 insertions, 0 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index aa850c8bed4..df4011f0589 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -640,6 +640,7 @@ return array( 'OCP\\Migration\\IOutput' => $baseDir . '/lib/public/Migration/IOutput.php', 'OCP\\Migration\\IRepairStep' => $baseDir . '/lib/public/Migration/IRepairStep.php', 'OCP\\Migration\\SimpleMigrationStep' => $baseDir . '/lib/public/Migration/SimpleMigrationStep.php', + 'OCP\\Navigation\\Events\\LoadAdditionalEntriesEvent' => $baseDir . '/lib/public/Navigation/Events/LoadAdditionalEntriesEvent.php', 'OCP\\Notification\\AlreadyProcessedException' => $baseDir . '/lib/public/Notification/AlreadyProcessedException.php', 'OCP\\Notification\\IAction' => $baseDir . '/lib/public/Notification/IAction.php', 'OCP\\Notification\\IApp' => $baseDir . '/lib/public/Notification/IApp.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index fd4993dd5a8..bbe553913ee 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -681,6 +681,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OCP\\Migration\\IOutput' => __DIR__ . '/../../..' . '/lib/public/Migration/IOutput.php', 'OCP\\Migration\\IRepairStep' => __DIR__ . '/../../..' . '/lib/public/Migration/IRepairStep.php', 'OCP\\Migration\\SimpleMigrationStep' => __DIR__ . '/../../..' . '/lib/public/Migration/SimpleMigrationStep.php', + 'OCP\\Navigation\\Events\\LoadAdditionalEntriesEvent' => __DIR__ . '/../../..' . '/lib/public/Navigation/Events/LoadAdditionalEntriesEvent.php', 'OCP\\Notification\\AlreadyProcessedException' => __DIR__ . '/../../..' . '/lib/public/Notification/AlreadyProcessedException.php', 'OCP\\Notification\\IAction' => __DIR__ . '/../../..' . '/lib/public/Notification/IAction.php', 'OCP\\Notification\\IApp' => __DIR__ . '/../../..' . '/lib/public/Notification/IApp.php', diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php index f341c6d3094..4bcd78b7fcf 100644 --- a/lib/private/NavigationManager.php +++ b/lib/private/NavigationManager.php @@ -11,6 +11,7 @@ use InvalidArgumentException; use OC\App\AppManager; use OC\Group\Manager; use OCP\App\IAppManager; +use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\IGroupManager; use OCP\INavigationManager; @@ -18,6 +19,7 @@ use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserSession; use OCP\L10N\IFactory; +use OCP\Navigation\Events\LoadAdditionalEntriesEvent; use Psr\Log\LoggerInterface; /** @@ -56,6 +58,7 @@ class NavigationManager implements INavigationManager { IGroupManager $groupManager, IConfig $config, LoggerInterface $logger, + protected IEventDispatcher $eventDispatcher, ) { $this->appManager = $appManager; $this->urlGenerator = $urlGenerator; @@ -318,6 +321,7 @@ class NavigationManager implements INavigationManager { ]); } } + $this->eventDispatcher->dispatchTyped(new LoadAdditionalEntriesEvent()); if ($this->userSession->isLoggedIn()) { $user = $this->userSession->getUser(); diff --git a/lib/public/Navigation/Events/LoadAdditionalEntriesEvent.php b/lib/public/Navigation/Events/LoadAdditionalEntriesEvent.php new file mode 100644 index 00000000000..61db417b927 --- /dev/null +++ b/lib/public/Navigation/Events/LoadAdditionalEntriesEvent.php @@ -0,0 +1,17 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Navigation\Events; + +use OCP\EventDispatcher\Event; + +/** + * @since 31.0.0 + */ +class LoadAdditionalEntriesEvent extends Event { +} |