MDL-52081 forms: indicate usage of grandparent constructor

This commit is contained in:
Marina Glancy 2015-12-10 13:37:57 +08:00
parent 1a0df5535e
commit 32fada5cb2
12 changed files with 12 additions and 0 deletions

View file

@ -80,6 +80,7 @@ class MoodleQuickForm_date_selector extends MoodleQuickForm_group {
$calendartype = \core_calendar\type_factory::get_calendar_instance(); $calendartype = \core_calendar\type_factory::get_calendar_instance();
$this->_options = array('startyear' => $calendartype->get_min_year(), 'stopyear' => $calendartype->get_max_year(), $this->_options = array('startyear' => $calendartype->get_min_year(), 'stopyear' => $calendartype->get_max_year(),
'defaulttime' => 0, 'timezone' => 99, 'step' => 5, 'optional' => false); 'defaulttime' => 0, 'timezone' => 99, 'step' => 5, 'optional' => false);
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes); HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true; $this->_persistantFreeze = true;
$this->_appendName = true; $this->_appendName = true;

View file

@ -83,6 +83,7 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group {
$this->_options = array('startyear' => $calendartype->get_min_year(), 'stopyear' => $calendartype->get_max_year(), $this->_options = array('startyear' => $calendartype->get_min_year(), 'stopyear' => $calendartype->get_max_year(),
'defaulttime' => 0, 'timezone' => 99, 'step' => 5, 'optional' => false); 'defaulttime' => 0, 'timezone' => 99, 'step' => 5, 'optional' => false);
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes); HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true; $this->_persistantFreeze = true;
$this->_appendName = true; $this->_appendName = true;

View file

@ -64,6 +64,7 @@ class MoodleQuickForm_duration extends MoodleQuickForm_group {
* @param mixed $attributes Either a typical HTML attribute string or an associative array * @param mixed $attributes Either a typical HTML attribute string or an associative array
*/ */
public function __construct($elementName = null, $elementLabel = null, $options = array(), $attributes = null) { public function __construct($elementName = null, $elementLabel = null, $options = array(), $attributes = null) {
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes); HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true; $this->_persistantFreeze = true;
$this->_appendName = true; $this->_appendName = true;

View file

@ -54,6 +54,7 @@ class MoodleQuickForm_modgrade extends MoodleQuickForm_group{
* @param mixed $attributes Either a typical HTML attribute string or an associative array * @param mixed $attributes Either a typical HTML attribute string or an associative array
*/ */
public function __construct($elementname = null, $elementlabel = null, $options = array(), $attributes = null) { public function __construct($elementname = null, $elementlabel = null, $options = array(), $attributes = null) {
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_QuickForm_element::__construct($elementname, $elementlabel, $attributes); HTML_QuickForm_element::__construct($elementname, $elementlabel, $attributes);
$this->_persistantFreeze = true; $this->_persistantFreeze = true;
$this->_appendName = true; $this->_appendName = true;

View file

@ -49,6 +49,7 @@ class MoodleQuickForm_modvisible extends MoodleQuickForm_select{
* @param array $options ignored * @param array $options ignored
*/ */
public function __construct($elementName=null, $elementLabel=null, $attributes=null, $options=null) { public function __construct($elementName=null, $elementLabel=null, $attributes=null, $options=null) {
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes, null); HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes, null);
$this->_type = 'modvisible'; $this->_type = 'modvisible';
} }

View file

@ -48,6 +48,7 @@ class MoodleQuickForm_selectyesno extends MoodleQuickForm_select{
* @param mixed $options ignored, not used. * @param mixed $options ignored, not used.
*/ */
public function __construct($elementName=null, $elementLabel=null, $attributes=null, $options=null) { public function __construct($elementName=null, $elementLabel=null, $attributes=null, $options=null) {
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes, null); HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes, null);
$this->_type = 'selectyesno'; $this->_type = 'selectyesno';
$this->_persistantFreeze = true; $this->_persistantFreeze = true;

View file

@ -1441,6 +1441,7 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
static $formcounter = 1; static $formcounter = 1;
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_Common::__construct($attributes); HTML_Common::__construct($attributes);
$target = empty($target) ? array() : array('target' => $target); $target = empty($target) ? array() : array('target' => $target);
$this->_formName = $formName; $this->_formName = $formName;

View file

@ -267,6 +267,7 @@ class HTML_QuickForm_date extends HTML_QuickForm_group
* @param mixed Either a typical HTML attribute string or an associative array * @param mixed Either a typical HTML attribute string or an associative array
*/ */
public function __construct($elementName = null, $elementLabel = null, $options = array(), $attributes = null) { public function __construct($elementName = null, $elementLabel = null, $options = array(), $attributes = null) {
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes); HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true; $this->_persistantFreeze = true;
$this->_appendName = true; $this->_appendName = true;

View file

@ -50,6 +50,7 @@ class HTML_QuickForm_hiddenselect extends HTML_QuickForm_select
* @return void * @return void
*/ */
public function __construct($elementName=null, $elementLabel=null, $options=null, $attributes=null) { public function __construct($elementName=null, $elementLabel=null, $options=null, $attributes=null) {
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes); HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true; $this->_persistantFreeze = true;
$this->_type = 'hiddenselect'; $this->_type = 'hiddenselect';

View file

@ -115,6 +115,7 @@ class HTML_QuickForm_hierselect extends HTML_QuickForm_group
* @return void * @return void
*/ */
public function __construct($elementName=null, $elementLabel=null, $attributes=null, $separator=null) { public function __construct($elementName=null, $elementLabel=null, $attributes=null, $separator=null) {
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes); HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true; $this->_persistantFreeze = true;
if (isset($separator)) { if (isset($separator)) {

View file

@ -58,6 +58,7 @@ class HTML_QuickForm_link extends HTML_QuickForm_static
* @throws * @throws
*/ */
public function __construct($elementName=null, $elementLabel=null, $href=null, $text=null, $attributes=null) { public function __construct($elementName=null, $elementLabel=null, $href=null, $text=null, $attributes=null) {
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes); HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = false; $this->_persistantFreeze = false;
$this->_type = 'link'; $this->_type = 'link';

View file

@ -58,6 +58,7 @@ class HTML_QuickForm_radio extends HTML_QuickForm_input
* @return void * @return void
*/ */
public function __construct($elementName=null, $elementLabel=null, $text=null, $value=null, $attributes=null) { public function __construct($elementName=null, $elementLabel=null, $text=null, $value=null, $attributes=null) {
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes); HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes);
if (isset($value)) { if (isset($value)) {
$this->setValue($value); $this->setValue($value);