summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2020-08-25 19:11:28 +0200
committerRobin Appelman <robin@icewind.nl>2020-08-25 19:11:28 +0200
commitaadf0f6f87499c59e22a7a5fda161a263954bb2c (patch)
treee1e5b65f3258cdfe90fedc52036ddcd3a9b46030
parent0934aee46bee13d5ac4d62eae6fe5250c25192fb (diff)
downloadnextcloud-server-aadf0f6f87499c59e22a7a5fda161a263954bb2c.tar.gz
nextcloud-server-aadf0f6f87499c59e22a7a5fda161a263954bb2c.zip
move calendar settings into their own group
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--apps/dav/composer/composer/autoload_classmap.php1
-rw-r--r--apps/dav/composer/composer/autoload_static.php1
-rw-r--r--apps/dav/lib/CalDAV/Activity/Setting/CalDAVSetting.php47
-rw-r--r--apps/dav/lib/CalDAV/Activity/Setting/Calendar.php16
-rw-r--r--apps/dav/lib/CalDAV/Activity/Setting/Event.php16
-rw-r--r--apps/dav/lib/CalDAV/Activity/Setting/Todo.php15
6 files changed, 52 insertions, 44 deletions
diff --git a/apps/dav/composer/composer/autoload_classmap.php b/apps/dav/composer/composer/autoload_classmap.php
index 0e465971a5e..aaa5e82da04 100644
--- a/apps/dav/composer/composer/autoload_classmap.php
+++ b/apps/dav/composer/composer/autoload_classmap.php
@@ -27,6 +27,7 @@ return array(
'OCA\\DAV\\CalDAV\\Activity\\Provider\\Calendar' => $baseDir . '/../lib/CalDAV/Activity/Provider/Calendar.php',
'OCA\\DAV\\CalDAV\\Activity\\Provider\\Event' => $baseDir . '/../lib/CalDAV/Activity/Provider/Event.php',
'OCA\\DAV\\CalDAV\\Activity\\Provider\\Todo' => $baseDir . '/../lib/CalDAV/Activity/Provider/Todo.php',
+ 'OCA\\DAV\\CalDAV\\Activity\\Setting\\CalDAVSetting' => $baseDir . '/../lib/CalDAV/Activity/Setting/CalDAVSetting.php',
'OCA\\DAV\\CalDAV\\Activity\\Setting\\Calendar' => $baseDir . '/../lib/CalDAV/Activity/Setting/Calendar.php',
'OCA\\DAV\\CalDAV\\Activity\\Setting\\Event' => $baseDir . '/../lib/CalDAV/Activity/Setting/Event.php',
'OCA\\DAV\\CalDAV\\Activity\\Setting\\Todo' => $baseDir . '/../lib/CalDAV/Activity/Setting/Todo.php',
diff --git a/apps/dav/composer/composer/autoload_static.php b/apps/dav/composer/composer/autoload_static.php
index 4788a41ef00..0dc34f5a317 100644
--- a/apps/dav/composer/composer/autoload_static.php
+++ b/apps/dav/composer/composer/autoload_static.php
@@ -42,6 +42,7 @@ class ComposerStaticInitDAV
'OCA\\DAV\\CalDAV\\Activity\\Provider\\Calendar' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Provider/Calendar.php',
'OCA\\DAV\\CalDAV\\Activity\\Provider\\Event' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Provider/Event.php',
'OCA\\DAV\\CalDAV\\Activity\\Provider\\Todo' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Provider/Todo.php',
+ 'OCA\\DAV\\CalDAV\\Activity\\Setting\\CalDAVSetting' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Setting/CalDAVSetting.php',
'OCA\\DAV\\CalDAV\\Activity\\Setting\\Calendar' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Setting/Calendar.php',
'OCA\\DAV\\CalDAV\\Activity\\Setting\\Event' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Setting/Event.php',
'OCA\\DAV\\CalDAV\\Activity\\Setting\\Todo' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Setting/Todo.php',
diff --git a/apps/dav/lib/CalDAV/Activity/Setting/CalDAVSetting.php b/apps/dav/lib/CalDAV/Activity/Setting/CalDAVSetting.php
new file mode 100644
index 00000000000..b20c27375a2
--- /dev/null
+++ b/apps/dav/lib/CalDAV/Activity/Setting/CalDAVSetting.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2020 Robin Appelman <robin@icewind.nl>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\DAV\CalDAV\Activity\Setting;
+
+use OCP\Activity\ActivitySettings;
+use OCP\IL10N;
+
+abstract class CalDAVSetting extends ActivitySettings {
+ /** @var IL10N */
+ protected $l;
+
+ /**
+ * @param IL10N $l
+ */
+ public function __construct(IL10N $l) {
+ $this->l = $l;
+ }
+
+ public function getGroupIdentifier() {
+ return 'calendar';
+ }
+
+ public function getGroupName() {
+ return $this->l->t("Calendar and tasks");
+ }
+}
diff --git a/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php b/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php
index b9475535e4d..06cbe33946d 100644
--- a/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php
+++ b/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php
@@ -23,21 +23,7 @@
namespace OCA\DAV\CalDAV\Activity\Setting;
-use OCP\Activity\ISetting;
-use OCP\IL10N;
-
-class Calendar implements ISetting {
-
- /** @var IL10N */
- protected $l;
-
- /**
- * @param IL10N $l
- */
- public function __construct(IL10N $l) {
- $this->l = $l;
- }
-
+class Calendar extends CalDAVSetting {
/**
* @return string Lowercase a-z and underscore only identifier
* @since 11.0.0
diff --git a/apps/dav/lib/CalDAV/Activity/Setting/Event.php b/apps/dav/lib/CalDAV/Activity/Setting/Event.php
index 1cd3fc3a051..d0c1676773c 100644
--- a/apps/dav/lib/CalDAV/Activity/Setting/Event.php
+++ b/apps/dav/lib/CalDAV/Activity/Setting/Event.php
@@ -23,21 +23,7 @@
namespace OCA\DAV\CalDAV\Activity\Setting;
-use OCP\Activity\ISetting;
-use OCP\IL10N;
-
-class Event implements ISetting {
-
- /** @var IL10N */
- protected $l;
-
- /**
- * @param IL10N $l
- */
- public function __construct(IL10N $l) {
- $this->l = $l;
- }
-
+class Event extends CalDAVSetting {
/**
* @return string Lowercase a-z and underscore only identifier
* @since 11.0.0
diff --git a/apps/dav/lib/CalDAV/Activity/Setting/Todo.php b/apps/dav/lib/CalDAV/Activity/Setting/Todo.php
index 2dfc85957c6..5ebc4ec2404 100644
--- a/apps/dav/lib/CalDAV/Activity/Setting/Todo.php
+++ b/apps/dav/lib/CalDAV/Activity/Setting/Todo.php
@@ -23,20 +23,7 @@
namespace OCA\DAV\CalDAV\Activity\Setting;
-use OCP\Activity\ISetting;
-use OCP\IL10N;
-
-class Todo implements ISetting {
-
- /** @var IL10N */
- protected $l;
-
- /**
- * @param IL10N $l
- */
- public function __construct(IL10N $l) {
- $this->l = $l;
- }
+class Todo extends CalDAVSetting {
/**
* @return string Lowercase a-z and underscore only identifier