Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 13
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
HelpPanelButton
0.00% covered (danger)
0.00%
0 / 13
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 12
0.00% covered (danger)
0.00%
0 / 1
2
 getJavaScriptClassName
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace GrowthExperiments\HelpPanel;
4
5class HelpPanelButton extends \OOUI\ButtonWidget {
6    /**
7     * @param array $config
8     */
9    public function __construct( array $config = [] ) {
10        // HelpPanelButton default config values need to be in sync with
11        // defaults in modules/ui-components/HelpPanelButton.js
12        // HelpPanelButton id is used when "infused" on the client
13        // side (ie: modules/ext.growthExperiments.HelpPanel/HelpPanelCta.js)
14        $config = array_merge( [
15            'id' => 'mw-ge-help-panel-cta-button',
16            'classes' => [ 'mw-ge-help-panel-button' ],
17            'target' => '_blank',
18            'invisibleLabel' => true,
19            'infusable' => true,
20            'icon' => 'help',
21            'indicator' => 'up',
22            'flags' => [ 'progressive' ],
23        ], $config );
24
25        parent::__construct( $config );
26    }
27
28    /** @inheritDoc */
29    protected function getJavaScriptClassName() {
30        return 'mw.libs.ge.HelpPanelButton';
31    }
32}