Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
EditBoxField | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getInputHTML | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\AbuseFilter\EditBox; |
4 | |
5 | use MediaWiki\HTMLForm\HTMLFormField; |
6 | |
7 | /** |
8 | * This class is used to easily wrap a filter editor box inside an HTMLForm. For now it's just a transparent |
9 | * wrapper around the given HTML string. In the future, some of the actual logic might be moved here. |
10 | * @unstable |
11 | */ |
12 | class EditBoxField extends HTMLFormField { |
13 | /** @var string */ |
14 | private $html; |
15 | |
16 | /** |
17 | * @param array $params |
18 | */ |
19 | public function __construct( array $params ) { |
20 | parent::__construct( $params ); |
21 | $this->html = $params['html']; |
22 | } |
23 | |
24 | /** |
25 | * @inheritDoc |
26 | */ |
27 | public function getInputHTML( $value ): string { |
28 | return $this->html; |
29 | } |
30 | } |