From: Joas Schilling Date: Fri, 22 Jan 2016 10:02:40 +0000 (+0100) Subject: Allow automatic injection of the Manager X-Git-Tag: v9.0beta1~217^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=31c5848e51e8a61e0f6c9931efa15ff80681e0e1;p=nextcloud-server.git Allow automatic injection of the Manager --- 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();