2015-10-28 07:23:38 +00:00
|
|
|
<?php
|
|
|
|
class EchoFlowThanksPresentationModel 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->getExtraParam( 'topic-title' ) );
|
|
|
|
$msg->params( $this->event->getTitle()->getPrefixedText() );
|
|
|
|
|
2015-11-13 00:03:55 +00:00
|
|
|
$msg->params( $this->getViewingUserForGender() );
|
2015-10-28 07:23:38 +00:00
|
|
|
return $msg;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getPrimaryLink() {
|
|
|
|
$title = $this->event->getTitle();
|
|
|
|
// Make a link to #flow-post-{postid}
|
|
|
|
$title = Title::makeTitle(
|
|
|
|
$title->getNamespace(),
|
|
|
|
$title->getDBKey(),
|
2015-11-16 23:46:47 +00:00
|
|
|
'flow-post-' . $this->event->getExtraParam( 'post-id' )
|
2015-10-28 07:23:38 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
return array(
|
|
|
|
$title->getFullURL( array(
|
|
|
|
'workflow' => $this->event->getExtraParam( 'workflow' )
|
|
|
|
) ),
|
2015-11-12 21:56:43 +00:00
|
|
|
$this->msg( 'notification-link-text-view-post' )->text()
|
2015-10-28 07:23:38 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO add thanking user as secondary link once we can make that look nice (T115421)
|
|
|
|
/*
|
|
|
|
public function getSecondaryLinks() {
|
|
|
|
$agent = $this->event->getAgent();
|
|
|
|
if ( !$agent || !$this->userCan( Revision::DELETED_USER ) ) {
|
|
|
|
return array();
|
|
|
|
}
|
|
|
|
|
|
|
|
$url = $agent->getUserPage()->getLocalURL();
|
|
|
|
return array(
|
|
|
|
$url => $agent->getName()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|