mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-18 10:52:27 +00:00
84e0d10abd
Bug: T321681 Change-Id: I19ff201e3a109d5f6b755c6c0857f7b22d08d26d
30 lines
572 B
PHP
30 lines
572 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\Notifications\Formatters;
|
|
|
|
use MediaWiki\Title\Title;
|
|
|
|
class EchoWelcomePresentationModel extends EchoEventPresentationModel {
|
|
|
|
public function getIconType() {
|
|
return 'site';
|
|
}
|
|
|
|
public function getPrimaryLink() {
|
|
$msg = $this->msg( 'notification-welcome-link' );
|
|
if ( $msg->isDisabled() ) {
|
|
return false;
|
|
}
|
|
|
|
$title = Title::newFromText( $msg->plain() );
|
|
if ( !$title ) {
|
|
return false;
|
|
}
|
|
|
|
return [
|
|
'url' => $title->getFullURL(),
|
|
'label' => $this->msg( 'notification-welcome-linktext' )->text(),
|
|
];
|
|
}
|
|
}
|