*/
namespace OCA\Comments\Activity;
-use OCP\Activity\ISetting;
+use OCP\Activity\ActivitySettings;
use OCP\IL10N;
-class Setting implements ISetting {
+class Setting extends ActivitySettings {
public function __construct(
protected IL10N $l,
) {
return $this->l->t('<strong>Comments</strong> for files');
}
+ public function getGroupIdentifier() {
+ return 'files';
+ }
+
+ public function getGroupName() {
+ return $this->l->t('Files');
+ }
+
public function getPriority(): int {
return 50;
}
}
public function getGroupIdentifier() {
- return 'files';
+ return 'sharing';
}
public function getGroupName() {
- return $this->l->t('Files');
+ return $this->l->t('Sharing');
}
}
*/
namespace OCA\SystemTags\Activity;
-use OCP\Activity\ISetting;
+use OCP\Activity\ActivitySettings;
use OCP\IL10N;
-class Setting implements ISetting {
-
- /** @var IL10N */
- protected $l;
-
- /**
- * @param IL10N $l
- */
- public function __construct(IL10N $l) {
- $this->l = $l;
+class Setting extends ActivitySettings {
+ public function __construct(protected IL10N $l) {
}
/**
return $this->l->t('<strong>System tags</strong> for a file have been modified');
}
+ /**
+ * @return string Lowercase a-z and underscore only group identifier
+ * @since 20.0.0
+ */
+ public function getGroupIdentifier() {
+ return 'files';
+ }
+
+ /**
+ * @return string A translated string for the settings group
+ * @since 20.0.0
+ */
+ public function getGroupName() {
+ return $this->l->t('Files');
+ }
+
/**
* @return int whether the filter should be rather on the top or bottom of
* the admin section. The filters are arranged in ascending order of the
* class based one
*/
class ActivitySettingsAdapter extends ActivitySettings {
- private $oldSettings;
- private $l10n;
-
- public function __construct(ISetting $oldSettings, IL10N $l10n) {
- $this->oldSettings = $oldSettings;
- $this->l10n = $l10n;
+ public function __construct(
+ private ISetting $oldSettings,
+ private IL10N $l10n
+ ) {
}
public function getIdentifier() {