* Defaults to false, which getOOUI will interpret as "use the HTML version"
*
* @param string $value
- * @return OOUI\\Widget|false
+ * @return OOUI\Widget|false
*/
function getInputOOUI( $value ) {
return false;
return call_user_func_array( $callback, $args );
}
+ /**
+ * If this field has a user-visible output or not. If not,
+ * it will not be rendered
+ *
+ * @return bool
+ */
+ public function hasVisibleOutput() {
+ return true;
+ }
/**
* Fetch a field value from $alldata for the closest field matching a given
*
* @param string $value The value to set the input to.
*
- * @return OOUI\\FieldLayout|OOUI\\ActionFieldLayout
+ * @return OOUI\FieldLayout|OOUI\ActionFieldLayout
*/
public function getOOUI( $value ) {
$inputField = $this->getInputOOUI( $value );
/**
* Get a FieldLayout (or subclass thereof) to wrap this field in when using OOUI output.
- * @return OOUI\\FieldLayout|OOUI\\ActionFieldLayout
+ * @return OOUI\FieldLayout|OOUI\ActionFieldLayout
*/
protected function getFieldLayoutOOUI( $inputField, $config ) {
if ( isset( $this->mClassWithButton ) ) {
foreach ( $oldoptions as $text => $data ) {
$options[] = array(
- 'data' => $data,
- 'label' => $text,
+ 'data' => (string)$data,
+ 'label' => (string)$text,
);
}