mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-15 10:59:42 +00:00
03b8f88fff
Change-Id: I939d6f4d989cf21c0f817d262bf3e4acedcf2ffe
32 lines
782 B
PHP
32 lines
782 B
PHP
<?php
|
|
class EchoThanksPresentationModel extends EchoEventPresentationModel {
|
|
public function canRender() {
|
|
return (bool)$this->event->getTitle();
|
|
}
|
|
|
|
public function getIconType() {
|
|
return 'thanks';
|
|
}
|
|
|
|
public function getHeaderMessage() {
|
|
$msg = parent::getHeaderMessage();
|
|
$msg->params( $this->getTruncatedTitleText( $this->event->getTitle(), true ) );
|
|
$msg->params( $this->getViewingUserForGender() );
|
|
return $msg;
|
|
}
|
|
|
|
public function getPrimaryLink() {
|
|
return [
|
|
'url' => $this->event->getTitle()->getLocalURL( [
|
|
'oldid' => 'prev',
|
|
'diff' => $this->event->getExtraParam( 'revid' )
|
|
] ),
|
|
'label' => $this->msg( 'notification-link-text-view-edit' )->text(),
|
|
];
|
|
}
|
|
|
|
public function getSecondaryLinks() {
|
|
return [ $this->getAgentLink() ];
|
|
}
|
|
}
|