2021-02-01 15:47:46 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace MediaWiki\Extension\AbuseFilter\EditBox;
|
|
|
|
|
2024-06-12 18:01:35 +00:00
|
|
|
use MediaWiki\HTMLForm\HTMLFormField;
|
2021-02-01 15:47:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This class is used to easily wrap a filter editor box inside an HTMLForm. For now it's just a transparent
|
|
|
|
* wrapper around the given HTML string. In the future, some of the actual logic might be moved here.
|
|
|
|
* @unstable
|
|
|
|
*/
|
|
|
|
class EditBoxField extends HTMLFormField {
|
|
|
|
/** @var string */
|
|
|
|
private $html;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param array $params
|
|
|
|
*/
|
|
|
|
public function __construct( array $params ) {
|
|
|
|
parent::__construct( $params );
|
|
|
|
$this->html = $params['html'];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritDoc
|
|
|
|
*/
|
2021-07-21 18:51:12 +00:00
|
|
|
public function getInputHTML( $value ): string {
|
2021-02-01 15:47:46 +00:00
|
|
|
return $this->html;
|
|
|
|
}
|
|
|
|
}
|