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:
Meirza
2023-06-14 09:53:22 +07:00
committed by meirzamoodle
parent 8c989335be
commit b613c4bbde
4 changed files with 39 additions and 0 deletions
+12
View File
@@ -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;
}
}