Debian Codegraph @

extensions/Echo/includes/Formatters/EchoWelcomePresentationModel.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Extension\Notifications\Formatters;
4
5 use MediaWiki\Title\Title;
6
7 class EchoWelcomePresentationModel extends EchoEventPresentationModel {
8
9 public function getIconType() {
10 return 'site';
11 }
12
13 public function getPrimaryLink() {
14 $msg = $this->msg( 'notification-welcome-link' );
15 if ( $msg->isDisabled() ) {
16 return false;
17 }
18
19 $title = Title::newFromText( $msg->plain() );
20 if ( !$title ) {
21 return false;
22 }
23
24 return [
25 'url' => $title->getFullURL(),
26 'label' => $this->msg( 'notification-welcome-linktext' )->text(),
27 ];
28 }
29 }