Page MenuHomeWickedGov Phorge

AddedTopicPresentationModel.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

AddedTopicPresentationModel.php

<?php
/**
* EchoEventPresentationModel for added subscribable section headings
*
* @file
* @ingroup Extensions
* @license MIT
*/
namespace MediaWiki\Extension\DiscussionTools\Notifications;
class AddedTopicPresentationModel extends SubscribedNewCommentPresentationModel {
/**
* @inheritDoc
*/
public function getPrimaryLink() {
return [
'url' => $this->getCommentLink() ?: $this->section->getTitleWithSection()->getFullURL(),
'label' => $this->msg( 'discussiontools-notification-added-topic-view' )->text()
];
}
/**
* @inheritDoc
*/
protected function getHeaderMessageKey() {
if ( $this->isBundled() ) {
return 'discussiontools-notification-added-topic-header-bundled';
} else {
return 'discussiontools-notification-added-topic-header';
}
}
/**
* @inheritDoc
*/
public function getHeaderMessage() {
if ( $this->isBundled() ) {
$count = $this->getNotificationCountForOutput();
$msg = $this->msg( $this->getHeaderMessageKey() );
$msg->numParams( $count );
$msg->params( $this->getTruncatedTitleText( $this->event->getTitle(), true ) );
return $msg;
} else {
$msg = parent::getHeaderMessage();
$msg->params( $this->getTruncatedTitleText( $this->event->getTitle(), true ) );
$msg->plaintextParams( $this->section->getTruncatedSectionTitle() );
return $msg;
}
}
/**
* @inheritDoc
*/
public function getCompactHeaderMessage() {
$msg = $this->getMessageWithAgent( 'discussiontools-notification-added-topic-header-compact' );
$msg->plaintextParams( $this->section->getTruncatedSectionTitle() );
$msg->plaintextParams( $this->getContentSnippet() );
return $msg;
}
/**
* @inheritDoc
*/
protected function getUnsubscribeConfirmationMessageKeys() {
return [
'title' => 'discussiontools-newtopicssubscription-notify-unsubscribed-title',
'description' => 'discussiontools-newtopicssubscription-notify-unsubscribed-body',
];
}
}

File Metadata

Mime Type
text/x-php
Expires
Aug 16 2026, 21:46 (11 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b7/56/48c6b5d71dcb9fec5f65c2c2bd24
Default Alt Text
AddedTopicPresentationModel.php (1 KB)

Event Timeline