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;
}
}
+12
View File
@@ -44,6 +44,9 @@ class MoodleQuickForm_password extends HTML_QuickForm_password implements templa
/** @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
*
@@ -91,4 +94,13 @@ class MoodleQuickForm_password extends HTML_QuickForm_password implements templa
function getHelpButton(){
return $this->_helpbutton;
}
/**
* Sets label to be hidden
*
* @param bool $hiddenLabel sets if label should be hidden
*/
public function setHiddenLabel($hiddenLabel) {
$this->_hiddenLabel = $hiddenLabel;
}
}
+12
View File
@@ -43,6 +43,9 @@ class MoodleQuickForm_radio extends HTML_QuickForm_radio implements templatable
/** @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
*
@@ -115,4 +118,13 @@ class MoodleQuickForm_radio extends HTML_QuickForm_radio implements templatable
{
return '<span>' . parent::toHtml() . '</span>';
}
/**
* Sets label to be hidden
*
* @param bool $hiddenLabel sets if label should be hidden
*/
public function setHiddenLabel($hiddenLabel) {
$this->_hiddenLabel = $hiddenLabel;
}
}
+3
View File
@@ -51,6 +51,9 @@ class MoodleQuickForm_url extends HTML_QuickForm_text implements templatable {
/** @var string the unique id of the filepicker, if enabled.*/
protected $filepickeruniqueid;
/** @var array data which need to be posted. */
protected $_options;
/**
* Constructor
*