mParams );
}
return $default;
}
/**
* @inheritDoc
* @stable to override
*/
public function getInputHTML( $value ) {
return !empty( $this->mParams['raw'] ) ? $value : htmlspecialchars( $value );
}
/**
* @inheritDoc
* @stable to override
*/
public function getInputOOUI( $value ) {
if ( !empty( $this->mParams['raw'] ) ) {
$value = new \OOUI\HtmlSnippet( $value );
}
return new \OOUI\LabelWidget( [
'label' => $value,
'id' => $this->mID
] );
}
/**
* @inheritDoc
* @stable to override
*/
public function getTableRow( $value ) {
if ( !empty( $this->mParams['rawrow'] ) ) {
return $value;
}
return parent::getTableRow( $value );
}
/**
* @stable to override
* @param string $value
* @return string
* @since 1.20
*/
public function getDiv( $value ) {
if ( !empty( $this->mParams['rawrow'] ) ) {
return $value;
}
return parent::getDiv( $value );
}
/**
* @stable to override
* @param string $value
* @return string
* @since 1.20
*/
public function getRaw( $value ) {
if ( !empty( $this->mParams['rawrow'] ) ) {
return $value;
}
return parent::getRaw( $value );
}
/**
* @stable to override
* @param mixed $value If not FieldLayout or subclass has been deprecated.
* @return \OOUI\FieldLayout
* @since 1.32
*/
public function getOOUI( $value ) {
if ( !empty( $this->mParams['rawrow'] ) ) {
if ( !( $value instanceof \OOUI\FieldLayout ) ) {
wfDeprecatedMsg( __METHOD__ . ": 'default' parameter as a string when using " .
"'rawrow' was deprecated in MediaWiki 1.32 (must be a FieldLayout or subclass)",
'1.32' );
}
return $value;
}
return parent::getOOUI( $value );
}
public function getCodex( $value ) {
if ( !empty( $this->mParams['rawrow'] ) ) {
return $value;
}
return parent::getCodex( $value );
}
/**
* @inheritDoc
* @stable to override
*/
protected function needsLabel() {
return false;
}
}
/** @deprecated class alias since 1.42 */
class_alias( HTMLInfoField::class, 'HTMLInfoField' );