mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-16 20:58:28 +00:00
31 lines
657 B
PHP
31 lines
657 B
PHP
|
<?php
|
||
|
/**
|
||
|
* Our override of the built-in Echo presentation model for user talk page notifications.
|
||
|
*
|
||
|
* @file
|
||
|
* @ingroup Extensions
|
||
|
* @license MIT
|
||
|
*/
|
||
|
|
||
|
namespace MediaWiki\Extension\DiscussionTools\Notifications;
|
||
|
|
||
|
use EchoMentionPresentationModel;
|
||
|
|
||
|
class EnhancedEchoMentionPresentationModel extends EchoMentionPresentationModel {
|
||
|
|
||
|
use DiscussionToolsEventTrait;
|
||
|
|
||
|
/**
|
||
|
* @inheritDoc
|
||
|
*/
|
||
|
public function getPrimaryLink() {
|
||
|
$linkInfo = parent::getPrimaryLink();
|
||
|
// For events enhanced by DiscussionTools: link to the individual comment
|
||
|
$link = $this->getCommentLink();
|
||
|
if ( $link ) {
|
||
|
$linkInfo['url'] = $link;
|
||
|
}
|
||
|
return $linkInfo;
|
||
|
}
|
||
|
}
|