Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
HTMLGlobalUserTextField
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 3
30
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getInputWidget
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
12
 getOOUIModules
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace MediaWiki\Extension\CentralAuth\Widget;
4
5use MediaWiki\HTMLForm\Field\HTMLUserTextField;
6
7/**
8 * Implements a text input field for usernames.
9 * Automatically auto-completes if using the OOUI display format.
10 *
11 * @since 1.33
12 */
13class HTMLGlobalUserTextField extends HTMLUserTextField {
14
15    /** @inheritDoc */
16    public function __construct( $params ) {
17        parent::__construct( $params );
18    }
19
20    /** @inheritDoc */
21    protected function getInputWidget( $params ) {
22        if ( isset( $this->mParams['excludenamed'] ) ) {
23            $params['excludenamed'] = $this->mParams['excludenamed'];
24        }
25
26        if ( isset( $this->mParams['excludetemp'] ) ) {
27            $params['excludetemp'] = $this->mParams['excludetemp'];
28        }
29
30        return new GlobalUserInputWidget( $params );
31    }
32
33    /** @inheritDoc */
34    protected function getOOUIModules() {
35        return [ 'ext.widgets.GlobalUserInputWidget' ];
36    }
37}