public function getDefault() {
$default = parent::getDefault();
if ( $default instanceof Closure ) {
- $default = call_user_func( $default, $this->mParams );
+ $default = $default( $this->mParams );
}
return $default;
}
return parent::getRaw( $value );
}
+ /**
+ * @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 ) ) {
+ wfDeprecated( __METHOD__ . ": 'default' parameter as a string when using" .
+ "'rawrow' (must be a FieldLayout or subclass)", '1.32' );
+ }
+ return $value;
+ }
+
+ return parent::getOOUI( $value );
+ }
+
protected function needsLabel() {
return false;
}