MDL-78163 lib: Added class properties that are not declared in form
In PHP 8.2 and later, setting a value to an undeclared class property is deprecated and emits a deprecation notice. So we need to add missing class properties that still need to be declared.
This commit is contained in:
@@ -46,6 +46,9 @@ class MoodleQuickForm_button extends HTML_QuickForm_button implements templatabl
|
||||
/** @var string html for help button, if empty then no help */
|
||||
var $_helpbutton='';
|
||||
|
||||
/** @var bool if true label will be hidden. */
|
||||
protected $_hiddenLabel = false;
|
||||
|
||||
/**
|
||||
* constructor
|
||||
*
|
||||
@@ -89,4 +92,13 @@ class MoodleQuickForm_button extends HTML_QuickForm_button implements templatabl
|
||||
return 'default';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets label to be hidden
|
||||
*
|
||||
* @param bool $hiddenLabel sets if label should be hidden
|
||||
*/
|
||||
public function setHiddenLabel($hiddenLabel) {
|
||||
$this->_hiddenLabel = $hiddenLabel;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user