2015-10-28 07:23:38 +00:00
|
|
|
<?php
|
2016-02-08 17:45:35 +00:00
|
|
|
|
|
|
|
class EchoFlowThanksPresentationModel extends Flow\FlowPresentationModel {
|
2015-10-28 07:23:38 +00:00
|
|
|
public function canRender() {
|
|
|
|
return (bool)$this->event->getTitle();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getIconType() {
|
|
|
|
return 'thanks';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getHeaderMessage() {
|
|
|
|
$msg = parent::getHeaderMessage();
|
2016-02-08 17:45:35 +00:00
|
|
|
|
|
|
|
$truncatedTopicTitle = $this->getTopicTitle();
|
|
|
|
$msg->plaintextParams( $truncatedTopicTitle );
|
2016-02-05 01:42:57 +00:00
|
|
|
$msg->params( $this->getTruncatedTitleText( $this->event->getTitle(), true ) );
|
2015-10-28 07:23:38 +00:00
|
|
|
|
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(
|
2016-01-12 21:45:42 +00:00
|
|
|
'url' => $title->getFullURL( array(
|
2015-10-28 07:23:38 +00:00
|
|
|
'workflow' => $this->event->getExtraParam( 'workflow' )
|
|
|
|
) ),
|
2016-01-12 21:45:42 +00:00
|
|
|
'label' => $this->msg( 'notification-link-text-view-post' )->text(),
|
2015-10-28 07:23:38 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getSecondaryLinks() {
|
2016-02-17 17:30:43 +00:00
|
|
|
return array( $this->getAgentLink(), $this->getBoardLink() );
|
2015-10-28 07:23:38 +00:00
|
|
|
}
|
|
|
|
}
|