Varien_Data_Form_Element_Checkbox Class Reference

Inheritance diagram for Varien_Data_Form_Element_Checkbox:

Varien_Data_Form_Element_Abstract Varien_Data_Form_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ($attributes=array())
 getHtmlAttributes ()
 getElementHtml ()
 setIsChecked ($value=false)
 getIsChecked ()


Detailed Description

Definition at line 34 of file Checkbox.php.


Constructor & Destructor Documentation

__construct ( attributes = array()  ) 

Enter description here...

Parameters:
array $attributes

Reimplemented from Varien_Data_Form_Element_Abstract.

Definition at line 36 of file Checkbox.php.

00037     {
00038         parent::__construct($attributes);
00039         $this->setType('checkbox');
00040         $this->setExtType('checkbox');
00041     }


Member Function Documentation

getElementHtml (  ) 

Reimplemented from Varien_Data_Form_Element_Abstract.

Definition at line 48 of file Checkbox.php.

00049     {
00050         if ($checked = $this->getChecked()) {
00051             $this->setData('checked', true);
00052         }
00053         else {
00054             $this->unsetData('checked');
00055         }
00056         return parent::getElementHtml();
00057     }

getHtmlAttributes (  ) 

Reimplemented from Varien_Data_Form_Element_Abstract.

Definition at line 43 of file Checkbox.php.

00044     {
00045         return array('type', 'title', 'class', 'style', 'checked', 'onclick', 'onchange', 'disabled');
00046     }

getIsChecked (  ) 

Return check status of checkbox

Returns:
boolean

Definition at line 76 of file Checkbox.php.

00076                                    {
00077         return $this->getData('checked');
00078     }

setIsChecked ( value = false  ) 

Set check status of checkbox

Parameters:
boolean $value
Returns:
Varien_Data_Form_Element_Checkbox

Definition at line 65 of file Checkbox.php.

00066     {
00067         $this->setData('checked', $value);
00068         return $this;
00069     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:59 2009 for Magento by  doxygen 1.5.8