nextcloud/apps/comments/lib/Activity/Setting.php
Carl Schwan 3c9b937e28
refactor(comment): Port away from deprecated event comment constant
Create new events to replace deprecated CommentsEvent constant and use
them when creating CommentsEvents.

On the listener side, we can't yet use these events as deck still send
the old events.

Also fixes some issues reported by psalm level 3 on the comment app.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-04 17:38:53 +01:00

53 lines
963 B
PHP

<?php
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Comments\Activity;
use OCP\Activity\ActivitySettings;
use OCP\IL10N;
class Setting extends ActivitySettings {
public function __construct(
protected readonly IL10N $l,
) {
}
public function getIdentifier(): string {
return 'comments';
}
public function getName(): string {
return $this->l->t('<strong>Comments</strong> for files');
}
public function getGroupIdentifier(): string {
return 'files';
}
public function getGroupName(): string {
return $this->l->t('Files');
}
public function getPriority(): int {
return 50;
}
public function canChangeStream(): bool {
return true;
}
public function isDefaultEnabledStream(): bool {
return true;
}
public function canChangeMail(): bool {
return true;
}
public function isDefaultEnabledMail(): bool {
return false;
}
}