mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-12-16 16:30:32 +00:00
882f6da0bf
Bug: T121822 Depends-On: Ia0a52926133ab7e04d7d9c2a095ef8f9d0871a49 Change-Id: Ic4711a61d68d82de69f063354e93e45aaa6485c7
32 lines
797 B
PHP
32 lines
797 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 array(
|
|
'url' => $this->event->getTitle()->getLocalURL( array(
|
|
'oldid' => 'prev',
|
|
'diff' => $this->event->getExtraParam( 'revid' )
|
|
) ),
|
|
'label' => $this->msg( 'notification-link-text-view-edit' )->text(),
|
|
);
|
|
}
|
|
|
|
public function getSecondaryLinks() {
|
|
return array( $this->getAgentLink() );
|
|
}
|
|
}
|