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 | public function __construct( array $params ) { |
| 17 | parent::__construct( $params ); |
| 18 | $this->html = $params['html']; |
| 19 | } |
| 20 | |
| 21 | /** |
| 22 | * @inheritDoc |
| 23 | */ |
| 24 | public function getInputHTML( $value ): string { |
| 25 | return $this->html; |
| 26 | } |
| 27 | } |