| 1 |
<?php |
| 2 |
|
| 3 |
namespace MediaWiki\Extension\Notifications\Formatters; |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
class EchoArticleReminderPresentationModel extends EchoEventPresentationModel { |
| 13 |
public function canRender() { |
| 14 |
return (bool)$this->event->getTitle(); |
| 15 |
} |
| 16 |
|
| 17 |
public function getIconType() { |
| 18 |
return 'article-reminder'; |
| 19 |
} |
| 20 |
|
| 21 |
public function getHeaderMessage() { |
| 22 |
$msg = $this->getMessageWithAgent( 'notification-header-article-reminder' ); |
| 23 |
$msg->params( $this->getTruncatedTitleText( $this->event->getTitle(), true ) ); |
| 24 |
return $msg; |
| 25 |
} |
| 26 |
|
| 27 |
public function getPrimaryLink() { |
| 28 |
return [ |
| 29 |
'url' => $this->event->getTitle()->getLocalURL(), |
| 30 |
'label' => $this->msg( 'notification-link-article-reminder' )->text(), |
| 31 |
]; |
| 32 |
} |
| 33 |
} |