mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2025-01-05 18:04:06 +00:00
fb846d54b0
Change-Id: I7d1ed933b23d7b0e69099fa373853a192699d6f7
45 lines
1,018 B
PHP
45 lines
1,018 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() {
|
|
$agent = $this->event->getAgent();
|
|
if ( !$agent || !$this->userCan( Revision::DELETED_USER ) ) {
|
|
return array();
|
|
}
|
|
|
|
return array(
|
|
array(
|
|
'url' => $agent->getUserPage()->getLocalURL(),
|
|
'label' => $agent->getName(),
|
|
'icon' => 'userAvatar',
|
|
'prioritized' => true,
|
|
)
|
|
);
|
|
}
|
|
}
|