Use __construct.

1.10.x
Julio Montoya 11 years ago
parent 592d6f04d4
commit 82b4f40a11
  1. 9
      main/inc/lib/pear/HTML/QuickForm/html.php
  2. 5
      main/inc/lib/pear/HTML/QuickForm/select.php
  3. 7
      main/inc/lib/pear/HTML/QuickForm/static.php
  4. 2
      main/inc/lib/pear/HTML/QuickForm/textarea.php

@ -44,7 +44,7 @@ class HTML_QuickForm_html extends HTML_QuickForm_static
* @access public
* @return void
*/
function _construct($text = null)
public function __construct($text = null)
{
parent::__construct(null, null, $text);
$this->_type = 'html';
@ -57,13 +57,8 @@ class HTML_QuickForm_html extends HTML_QuickForm_static
* @access public
* @return void
*/
function accept(&$renderer, $required = false, $error = null)
public function accept(&$renderer, $required = false, $error = null)
{
$renderer->renderHtml($this);
}
function toHtml()
{
return parent::toHtml();
}
}

@ -34,7 +34,8 @@
* @version Release: 3.2.11
* @since 1.0
*/
class HTML_QuickForm_select extends HTML_QuickForm_element {
class HTML_QuickForm_select extends HTML_QuickForm_element
{
// {{{ properties
@ -81,7 +82,7 @@ class HTML_QuickForm_select extends HTML_QuickForm_element {
if (is_array($attributes) || empty($attributes)) {
$attributes['class'] = 'form-control';
}
HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes);
parent::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true;
$this->_type = 'select';
if (isset($options)) {

@ -30,7 +30,8 @@
* @version Release: 3.2.11
* @since 2.7
*/
class HTML_QuickForm_static extends HTML_QuickForm_element {
class HTML_QuickForm_static extends HTML_QuickForm_element
{
// {{{ properties
@ -54,7 +55,7 @@ class HTML_QuickForm_static extends HTML_QuickForm_element {
*/
public function __construct($elementName = null, $elementLabel = null, $text = null, $attributes = null)
{
HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes);
parent::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = false;
$this->_type = 'static';
$this->_text = $text;
@ -128,7 +129,7 @@ class HTML_QuickForm_static extends HTML_QuickForm_element {
* @access public
* @return string
*/
function toHtml()
public function toHtml()
{
return $this->_getTabs() . $this->_text;
} //end func toHtml

@ -60,7 +60,7 @@ class HTML_QuickForm_textarea extends HTML_QuickForm_element
public function __construct($elementName=null, $elementLabel=null, $attributes=null)
{
$attributes['class'] = isset($attributes['class']) ? $attributes['class'] : 'form-control';
HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes);
parent::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true;
$this->_type = 'textarea';
} //end constructor

Loading…
Cancel
Save