File tree Expand file tree Collapse file tree 4 files changed +35
-21
lines changed
files_sharing/lib/Activity/Settings Expand file tree Collapse file tree 4 files changed +35
-21
lines changed Original file line number Diff line number Diff line change 55 */
66namespace OCA \Comments \Activity ;
77
8- use OCP \Activity \ISetting ;
8+ use OCP \Activity \ActivitySettings ;
99use OCP \IL10N ;
1010
11- class Setting implements ISetting {
11+ class Setting extends ActivitySettings {
1212 public function __construct (
1313 protected IL10N $ l ,
1414 ) {
@@ -22,6 +22,14 @@ public function getName(): string {
2222 return $ this ->l ->t ('<strong>Comments</strong> for files ' );
2323 }
2424
25+ public function getGroupIdentifier () {
26+ return 'files ' ;
27+ }
28+
29+ public function getGroupName () {
30+ return $ this ->l ->t ('Files ' );
31+ }
32+
2533 public function getPriority (): int {
2634 return 50 ;
2735 }
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ public function __construct(IL10N $l) {
2323 }
2424
2525 public function getGroupIdentifier () {
26- return 'files ' ;
26+ return 'sharing ' ;
2727 }
2828
2929 public function getGroupName () {
30- return $ this ->l ->t ('Files ' );
30+ return $ this ->l ->t ('Sharing ' );
3131 }
3232}
Original file line number Diff line number Diff line change 55 */
66namespace OCA \SystemTags \Activity ;
77
8- use OCP \Activity \ISetting ;
8+ use OCP \Activity \ActivitySettings ;
99use OCP \IL10N ;
1010
11- class Setting implements ISetting {
12-
13- /** @var IL10N */
14- protected $ l ;
15-
16- /**
17- * @param IL10N $l
18- */
19- public function __construct (IL10N $ l ) {
20- $ this ->l = $ l ;
11+ class Setting extends ActivitySettings {
12+ public function __construct (protected IL10N $ l ) {
2113 }
2214
2315 /**
@@ -36,6 +28,22 @@ public function getName() {
3628 return $ this ->l ->t ('<strong>System tags</strong> for a file have been modified ' );
3729 }
3830
31+ /**
32+ * @return string Lowercase a-z and underscore only group identifier
33+ * @since 20.0.0
34+ */
35+ public function getGroupIdentifier () {
36+ return 'files ' ;
37+ }
38+
39+ /**
40+ * @return string A translated string for the settings group
41+ * @since 20.0.0
42+ */
43+ public function getGroupName () {
44+ return $ this ->l ->t ('Files ' );
45+ }
46+
3947 /**
4048 * @return int whether the filter should be rather on the top or bottom of
4149 * the admin section. The filters are arranged in ascending order of the
Original file line number Diff line number Diff line change 1717 * class based one
1818 */
1919class ActivitySettingsAdapter extends ActivitySettings {
20- private $ oldSettings ;
21- private $ l10n ;
22-
23- public function __construct (ISetting $ oldSettings , IL10N $ l10n ) {
24- $ this ->oldSettings = $ oldSettings ;
25- $ this ->l10n = $ l10n ;
20+ public function __construct (
21+ private ISetting $ oldSettings ,
22+ private IL10N $ l10n
23+ ) {
2624 }
2725
2826 public function getIdentifier () {
You can’t perform that action at this time.
0 commit comments