protected $mVFormClass = '';
protected $mHelpClass = false;
protected $mDefault;
+ /**
+ * @var array|bool|null
+ */
protected $mOptions = false;
protected $mOptionsLabelsNotFromMessage = false;
protected $mHideIf = null;
$args = func_get_args();
if ( $this->mParent ) {
- $callback = [ $this->mParent, 'msg' ];
- } else {
- $callback = 'wfMessage';
+ return $this->mParent->msg( ...$args );
}
-
- return call_user_func_array( $callback, $args );
+ return wfMessage( ...$args );
}
/**
}
if ( isset( $this->mValidationCallback ) ) {
- return call_user_func( $this->mValidationCallback, $value, $alldata, $this->mParent );
+ return ( $this->mValidationCallback )( $value, $alldata, $this->mParent );
}
return true;
public function filter( $value, $alldata ) {
if ( isset( $this->mFilterCallback ) ) {
- $value = call_user_func( $this->mFilterCallback, $value, $alldata, $this->mParent );
+ $value = ( $this->mFilterCallback )( $value, $alldata, $this->mParent );
}
return $value;
'mw-htmlform-nolabel' => ( $label === '' )
];
- $horizontalLabel = isset( $this->mParams['horizontal-label'] )
- ? $this->mParams['horizontal-label'] : false;
+ $horizontalLabel = $this->mParams['horizontal-label'] ?? false;
if ( $horizontalLabel ) {
$field = ' ' . $inputHtml . "\n$errors";
$displayFormat = $this->mParent->getDisplayFormat();
$html = '';
- $horizontalLabel = isset( $this->mParams['horizontal-label'] )
- ? $this->mParams['horizontal-label'] : false;
+ $horizontalLabel = $this->mParams['horizontal-label'] ?? false;
if ( $displayFormat === 'table' ) {
$html =