mediawiki-extensions-Thanks/ThanksPresentationModel.php
Stephane Bisson cc3e3d97e7 Add agent link to all Thanks notifications
Bug: T121737
Change-Id: I1f419ce75c84c162626a3955568fbe75b921377e
Depends-On: I826cc6088b4f9c1aaef9e8adee0566d25982ed47
2015-12-22 11:02:50 -05:00

33 lines
758 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(
$this->event->getTitle()->getLocalURL( array(
'oldid' => 'prev',
'diff' => $this->event->getExtraParam( 'revid' )
) ),
$this->msg( 'notification-link-text-view-edit' )->text()
);
}
public function getSecondaryLinks() {
return array( $this->getAgentLink() );
}
}