mediawiki-extensions-Echo/includes/Formatters/EchoArticleReminderPresentationModel.php
Reedy 7619a76877 Namespace Echo Formatters
Change-Id: I5bf398cdb76a577543f6526ac1bee4a73897103d
2022-11-01 21:20:06 -06:00

34 lines
788 B
PHP

<?php
namespace MediaWiki\Extension\Notifications\Formatters;
/**
* Presenter for 'article-reminder' notification
*
* @author Ela Opper
*
* @license MIT
*/
class EchoArticleReminderPresentationModel extends EchoEventPresentationModel {
public function canRender() {
return (bool)$this->event->getTitle();
}
public function getIconType() {
return 'article-reminder';
}
public function getHeaderMessage() {
$msg = $this->getMessageWithAgent( 'notification-header-article-reminder' );
$msg->params( $this->getTruncatedTitleText( $this->event->getTitle(), true ) );
return $msg;
}
public function getPrimaryLink() {
return [
'url' => $this->event->getTitle()->getLocalURL(),
'label' => $this->msg( 'notification-link-article-reminder' )->text(),
];
}
}