From 31c5848e51e8a61e0f6c9931efa15ff80681e0e1 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 22 Jan 2016 11:02:40 +0100 Subject: [PATCH] Allow automatic injection of the Manager --- lib/private/appframework/dependencyinjection/dicontainer.php | 4 ++++ lib/public/iservercontainer.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php index 8fc52141d5b..10cff1b68a2 100644 --- a/lib/private/appframework/dependencyinjection/dicontainer.php +++ b/lib/private/appframework/dependencyinjection/dicontainer.php @@ -174,6 +174,10 @@ class DIContainer extends SimpleContainer implements IAppContainer { return $this->getServer()->getNavigationManager(); }); + $this->registerService('OCP\\Notification\IManager', function($c) { + return $this->getServer()->getNotificationManager(); + }); + $this->registerService('OCP\\IPreview', function($c) { return $this->getServer()->getPreviewManager(); }); diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php index 259f991414a..eb4498a1a24 100644 --- a/lib/public/iservercontainer.php +++ b/lib/public/iservercontainer.php @@ -469,7 +469,7 @@ interface IServerContainer { * Get the Notification Manager * * @return \OCP\Notification\IManager - * @since 8.2.0 + * @since 9.0.0 */ public function getNotificationManager(); -- 2.39.5