mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-18 19:01:28 +00:00
7619a76877
Change-Id: I5bf398cdb76a577543f6526ac1bee4a73897103d
34 lines
788 B
PHP
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(),
|
|
];
|
|
}
|
|
}
|