mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-12-17 00:40:33 +00:00
256f21d6c4
This is what links used to look like, but we've changed that awhile ago. Echo still has B/C support for this, but ideally we should conform to the interface. Change-Id: I7503db28b0d81fb818b525ea9362e49b9b56342a
33 lines
779 B
PHP
33 lines
779 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->event->getTitle()->getPrefixedText() );
|
|
|
|
$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() );
|
|
}
|
|
}
|