summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CardDAV/AddressBookRoot.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-02-27 16:54:07 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-09 13:12:18 +0100
commitec245d5feccc63abae3944c2ed59c99fbad3e6d7 (patch)
treef2d5b6bfe21649707b7edd05f516a1572b593d05 /apps/dav/lib/CardDAV/AddressBookRoot.php
parentac03f54079535fd9e047fbe3fbbe2a5768eb6e83 (diff)
downloadnextcloud-server-ec245d5feccc63abae3944c2ed59c99fbad3e6d7.tar.gz
nextcloud-server-ec245d5feccc63abae3944c2ed59c99fbad3e6d7.zip
Add address book plugins
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/lib/CardDAV/AddressBookRoot.php')
-rw-r--r--apps/dav/lib/CardDAV/AddressBookRoot.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/apps/dav/lib/CardDAV/AddressBookRoot.php b/apps/dav/lib/CardDAV/AddressBookRoot.php
index 4b836616791..4436775653d 100644
--- a/apps/dav/lib/CardDAV/AddressBookRoot.php
+++ b/apps/dav/lib/CardDAV/AddressBookRoot.php
@@ -24,21 +24,24 @@
namespace OCA\DAV\CardDAV;
-use OCP\IL10N;
+use OCA\DAV\AppInfo\PluginManager;
class AddressBookRoot extends \Sabre\CardDAV\AddressBookRoot {
- /** @var IL10N */
- protected $l10n;
+ /** @var PluginManager */
+ private $pluginManager;
/**
* @param \Sabre\DAVACL\PrincipalBackend\BackendInterface $principalBackend
* @param \Sabre\CardDAV\Backend\BackendInterface $carddavBackend
* @param string $principalPrefix
*/
- public function __construct(\Sabre\DAVACL\PrincipalBackend\BackendInterface $principalBackend, \Sabre\CardDAV\Backend\BackendInterface $carddavBackend, $principalPrefix = 'principals') {
+ public function __construct(\Sabre\DAVACL\PrincipalBackend\BackendInterface $principalBackend,
+ \Sabre\CardDAV\Backend\BackendInterface $carddavBackend,
+ PluginManager $pluginManager,
+ $principalPrefix = 'principals') {
parent::__construct($principalBackend, $carddavBackend, $principalPrefix);
- $this->l10n = \OC::$server->getL10N('dav');
+ $this->pluginManager = $pluginManager;
}
/**
@@ -49,12 +52,11 @@ class AddressBookRoot extends \Sabre\CardDAV\AddressBookRoot {
* supplied by the authentication backend.
*
* @param array $principal
+ *
* @return \Sabre\DAV\INode
*/
function getChildForPrincipal(array $principal) {
-
- return new UserAddressBooks($this->carddavBackend, $principal['uri'], $this->l10n);
-
+ return new UserAddressBooks($this->carddavBackend, $principal['uri'], $this->pluginManager);
}
function getName() {