Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 19
0.00% covered (danger)
0.00%
0 / 4
CRAP
0.00% covered (danger)
0.00%
0 / 1
EchoNewPraiseworthyMenteesPresentationModel
0.00% covered (danger)
0.00%
0 / 19
0.00% covered (danger)
0.00%
0 / 4
20
0.00% covered (danger)
0.00%
0 / 1
 getIconType
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getHeaderMessageKey
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getPrimaryLink
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
2
 getSecondaryLinks
0.00% covered (danger)
0.00%
0 / 10
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace GrowthExperiments\MentorDashboard\PersonalizedPraise;
4
5use MediaWiki\Extension\Notifications\Formatters\EchoEventPresentationModel;
6use MediaWiki\SpecialPage\SpecialPage;
7
8class EchoNewPraiseworthyMenteesPresentationModel extends EchoEventPresentationModel {
9
10    /** @inheritDoc */
11    public function getIconType() {
12        return 'growthexperiments-mentor';
13    }
14
15    /** @inheritDoc */
16    protected function getHeaderMessageKey() {
17        return 'growthexperiments-notification-header-new-praiseworthy-mentees';
18    }
19
20    /** @inheritDoc */
21    public function getPrimaryLink() {
22        $title = SpecialPage::getTitleFor( 'MentorDashboard' );
23        return [
24            'url' => $title->getCanonicalURL( [
25                'source' => 'personalized-praise-notification-' . $this->getDistributionType()
26            ] ),
27            'label' => $title->getText()
28        ];
29    }
30
31    /** @inheritDoc */
32    public function getSecondaryLinks() {
33        $title = SpecialPage::getTitleFor( 'MentorDashboard' );
34
35        return [
36            [
37                'url' => $title->getCanonicalURL( [
38                    'source' => 'personalized-praise-notification-' . $this->getDistributionType()
39                ] ),
40                'label' => $this->msg( 'growthexperiments-notification-secondary-link-new-praiseworthy-mentees' )
41                    ->text()
42            ]
43        ];
44    }
45}