1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* @copyright Copyright (c) 2017 Joas Schilling <[email protected]> |
4
|
|
|
* |
5
|
|
|
* @author Joas Schilling <[email protected]> |
6
|
|
|
* |
7
|
|
|
* @license GNU AGPL version 3 or any later version |
8
|
|
|
* |
9
|
|
|
* This program is free software: you can redistribute it and/or modify |
10
|
|
|
* it under the terms of the GNU Affero General Public License as |
11
|
|
|
* published by the Free Software Foundation, either version 3 of the |
12
|
|
|
* License, or (at your option) any later version. |
13
|
|
|
* |
14
|
|
|
* This program is distributed in the hope that it will be useful, |
15
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
16
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17
|
|
|
* GNU Affero General Public License for more details. |
18
|
|
|
* |
19
|
|
|
* You should have received a copy of the GNU Affero General Public License |
20
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
21
|
|
|
* |
22
|
|
|
*/ |
23
|
|
|
|
24
|
|
|
namespace OC\Settings\Activity; |
25
|
|
|
|
26
|
|
|
use OCP\Activity\ISetting; |
27
|
|
|
use OCP\IL10N; |
28
|
|
|
|
29
|
|
|
class GroupSetting implements ISetting { |
30
|
|
|
|
31
|
|
|
/** @var IL10N */ |
32
|
|
|
protected $l; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @param IL10N $l10n |
36
|
|
|
*/ |
37
|
|
|
public function __construct(IL10N $l10n) { |
38
|
|
|
$this->l = $l10n; |
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* @return string Lowercase a-z and underscore only identifier |
43
|
|
|
* @since 11.0.0 |
44
|
|
|
*/ |
45
|
|
|
public function getIdentifier(): string { |
46
|
|
|
return 'group_settings'; |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* @return string A translated string |
51
|
|
|
* @since 11.0.0 |
52
|
|
|
*/ |
53
|
|
|
public function getName(): string { |
54
|
|
|
return $this->l->t('Your <strong>group memberships</strong> were modified'); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @return int whether the filter should be rather on the top or bottom of |
59
|
|
|
* the admin section. The filters are arranged in ascending order of the |
60
|
|
|
* priority values. It is required to return a value between 0 and 100. |
61
|
|
|
* @since 11.0.0 |
62
|
|
|
*/ |
63
|
|
|
public function getPriority(): int { |
64
|
|
|
return 0; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @return bool True when the option can be changed for the stream |
69
|
|
|
* @since 11.0.0 |
70
|
|
|
*/ |
71
|
|
|
public function canChangeStream(): bool { |
72
|
|
|
return false; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @return bool True when the option can be changed for the stream |
77
|
|
|
* @since 11.0.0 |
78
|
|
|
*/ |
79
|
|
|
public function isDefaultEnabledStream(): bool { |
80
|
|
|
return true; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @return bool True when the option can be changed for the mail |
85
|
|
|
* @since 11.0.0 |
86
|
|
|
*/ |
87
|
|
|
public function canChangeMail(): bool { |
88
|
|
|
return false; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @return bool True when the option can be changed for the stream |
93
|
|
|
* @since 11.0.0 |
94
|
|
|
*/ |
95
|
|
|
public function isDefaultEnabledMail(): bool { |
96
|
|
|
return true; |
97
|
|
|
} |
98
|
|
|
} |
99
|
|
|
|