mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-25 06:03:58 +00:00
a4974ef1e1
Includes feature flag, presentation model. Temporarly hooks to new user creation. Bug: T165755 Bug: T165754 Change-Id: Ic0a2ca07b0cd1597e5534bb1f3b748beb215ddfc
31 lines
730 B
PHP
31 lines
730 B
PHP
<?php
|
|
/**
|
|
* 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(),
|
|
];
|
|
}
|
|
}
|