diff options
author | Robin Appelman <robin@icewind.nl> | 2020-08-12 00:15:53 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-08-13 00:01:30 +0200 |
commit | a11769e0e33ab5a33d1f33868f556abb6c2b5dbe (patch) | |
tree | 10f5fa6664bbb66775454fe6b734394dd15802f4 /apps/files_sharing/lib | |
parent | f49de1d775218d9acab9a85ed4770e69c94cb454 (diff) | |
download | nextcloud-server-a11769e0e33ab5a33d1f33868f556abb6c2b5dbe.tar.gz nextcloud-server-a11769e0e33ab5a33d1f33868f556abb6c2b5dbe.zip |
move share notifcation settings to files group
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_sharing/lib')
4 files changed, 50 insertions, 36 deletions
diff --git a/apps/files_sharing/lib/Activity/Settings/PublicLinks.php b/apps/files_sharing/lib/Activity/Settings/PublicLinks.php index 60094b656e1..fd8b6b56b88 100644 --- a/apps/files_sharing/lib/Activity/Settings/PublicLinks.php +++ b/apps/files_sharing/lib/Activity/Settings/PublicLinks.php @@ -26,18 +26,7 @@ namespace OCA\Files_Sharing\Activity\Settings; use OCP\Activity\ISetting; use OCP\IL10N; -class PublicLinks implements ISetting { - - /** @var IL10N */ - protected $l; - - /** - * @param IL10N $l - */ - public function __construct(IL10N $l) { - $this->l = $l; - } - +class PublicLinks extends ShareActivitySettings { /** * @return string Lowercase a-z and underscore only identifier * @since 11.0.0 diff --git a/apps/files_sharing/lib/Activity/Settings/RemoteShare.php b/apps/files_sharing/lib/Activity/Settings/RemoteShare.php index 319b4ebfef3..f6c4b873b45 100644 --- a/apps/files_sharing/lib/Activity/Settings/RemoteShare.php +++ b/apps/files_sharing/lib/Activity/Settings/RemoteShare.php @@ -27,18 +27,7 @@ namespace OCA\Files_Sharing\Activity\Settings; use OCP\Activity\ISetting; use OCP\IL10N; -class RemoteShare implements ISetting { - - /** @var IL10N */ - protected $l; - - /** - * @param IL10N $l - */ - public function __construct(IL10N $l) { - $this->l = $l; - } - +class RemoteShare extends ShareActivitySettings { /** * @return string Lowercase a-z and underscore only identifier * @since 11.0.0 diff --git a/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php b/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php new file mode 100644 index 00000000000..14f3fe339c1 --- /dev/null +++ b/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.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\Files_Sharing\Activity\Settings; + +use OCP\Activity\ActivitySettings; +use OCP\IL10N; + +abstract class ShareActivitySettings extends ActivitySettings { + /** @var IL10N */ + protected $l; + + /** + * @param IL10N $l + */ + public function __construct(IL10N $l) { + $this->l = $l; + } + + public function getGroupIdentifier() { + return 'files'; + } + + public function getGroupName() { + return $this->l->t('Files'); + } +} diff --git a/apps/files_sharing/lib/Activity/Settings/Shared.php b/apps/files_sharing/lib/Activity/Settings/Shared.php index 1eb6270af3d..40c3e0fea06 100644 --- a/apps/files_sharing/lib/Activity/Settings/Shared.php +++ b/apps/files_sharing/lib/Activity/Settings/Shared.php @@ -27,18 +27,7 @@ namespace OCA\Files_Sharing\Activity\Settings; use OCP\Activity\ISetting; use OCP\IL10N; -class Shared implements ISetting { - - /** @var IL10N */ - protected $l; - - /** - * @param IL10N $l - */ - public function __construct(IL10N $l) { - $this->l = $l; - } - +class Shared extends ShareActivitySettings { /** * @return string Lowercase a-z and underscore only identifier * @since 11.0.0 |