Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4069270
AddedTopicPresentationModel.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
AddedTopicPresentationModel.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment