Expose $wgMaxArticleSize in siteinfo query api
[mediawiki.git] / includes / htmlform / HTMLInfoField.php
blobada4fb67c60eca20503774babf1cbaa4537cf374
1 <?php
3 /**
4 * An information field (text blob), not a proper input.
5 */
6 class HTMLInfoField extends HTMLFormField {
7 public function __construct( $info ) {
8 $info['nodata'] = true;
10 parent::__construct( $info );
13 public function getInputHTML( $value ) {
14 return !empty( $this->mParams['raw'] ) ? $value : htmlspecialchars( $value );
17 public function getInputOOUI( $value ) {
18 if ( !empty( $this->mParams['raw'] ) ) {
19 $value = new OOUI\HtmlSnippet( $value );
22 return new OOUI\LabelWidget( [
23 'label' => $value,
24 ] );
27 public function getTableRow( $value ) {
28 if ( !empty( $this->mParams['rawrow'] ) ) {
29 return $value;
32 return parent::getTableRow( $value );
35 /**
36 * @param string $value
37 * @return string
38 * @since 1.20
40 public function getDiv( $value ) {
41 if ( !empty( $this->mParams['rawrow'] ) ) {
42 return $value;
45 return parent::getDiv( $value );
48 /**
49 * @param string $value
50 * @return string
51 * @since 1.20
53 public function getRaw( $value ) {
54 if ( !empty( $this->mParams['rawrow'] ) ) {
55 return $value;
58 return parent::getRaw( $value );
61 protected function needsLabel() {
62 return false;