diff options
author | Joas Schilling <coding@schilljs.com> | 2019-07-16 12:57:50 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-07-16 12:58:09 +0300 |
commit | e1c6b839ff9d2b29fcc7de8f671d65f5bf5f13e0 (patch) | |
tree | 1fb456d480edc31e74d99af034943c3336326c01 /lib | |
parent | fe0eeb3d9adfbf53eaf8cac2622ebb0d51518348 (diff) |
Adjust notifier to Nextcloud 17
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Notifier.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/Notifier.php b/lib/Notifier.php index 9712d76..1605510 100644 --- a/lib/Notifier.php +++ b/lib/Notifier.php @@ -46,12 +46,32 @@ class Notifier implements INotifier { } /** + * Identifier of the notifier, only use [a-z0-9_] + * + * @return string + * @since 17.0.0 + */ + public function getID(): string { + return 'survey_client'; + } + + /** + * Human readable name describing the notifier + * + * @return string + * @since 17.0.0 + */ + public function getName(): string { + return $this->l10nFactory->get('survey_client')->t('Usage survey'); + } + + /** * @param INotification $notification * @param string $languageCode The code of the language that should be used to prepare the notification * @return INotification * @throws \InvalidArgumentException When the notification was not prepared by a notifier */ - public function prepare(INotification $notification, $languageCode) { + public function prepare(INotification $notification, string $languageCode): INotification { if ($notification->getApp() !== 'survey_client') { // Not my app => throw throw new \InvalidArgumentException(); |