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();
|
2016-02-05 01:42:57 +00:00
|
|
|
$msg->params( $this->language->truncate( $this->event->getExtraParam( 'topic-title' ), self::SECTION_TITLE_RECOMMENDED_LENGTH ) );
|
|
|
|
$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() {
|
2015-12-22 16:02:50 +00:00
|
|
|
$titleLink = array(
|
|
|
|
'url' => $this->event->getTitle()->getLocalURL(),
|
|
|
|
'label' => $this->event->getTitle()->getPrefixedText(),
|
2016-01-12 21:45:42 +00:00
|
|
|
'description' => '',
|
2015-12-22 16:02:50 +00:00
|
|
|
'icon' => 'speechBubbles',
|
|
|
|
'prioritized' => true,
|
2015-10-28 07:23:38 +00:00
|
|
|
);
|
2015-12-22 16:02:50 +00:00
|
|
|
|
|
|
|
return array( $this->getAgentLink(), $titleLink );
|
2015-10-28 07:23:38 +00:00
|
|
|
}
|
|
|
|
}
|