Public Member Functions | |
__construct ($attributes=array()) | |
addType ($type, $className) | |
getElements () | |
addElement (Varien_Data_Form_Element_Abstract $element, $after=null) | |
addField ($elementId, $type, $config, $after=false) | |
removeField ($elementId) | |
addFieldset ($elementId, $config, $after=false) | |
addColumn ($elementId, $config) | |
__toArray (array $arrAttributes=array()) | |
Protected Attributes | |
$_elements | |
$_types = array() |
Definition at line 35 of file Abstract.php.
__construct | ( | $ | attributes = array() |
) |
Enter description here...
array | $attributes |
Reimplemented in Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Boolean, Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Price, Mage_Adminhtml_Block_System_Config_Form_Field_Import, Varien_Data_Form_Element_Abstract, Varien_Data_Form_Element_Button, Varien_Data_Form_Element_Checkbox, Varien_Data_Form_Element_Checkboxes, Varien_Data_Form_Element_Column, Varien_Data_Form_Element_Date, Varien_Data_Form_Element_Editor, Varien_Data_Form_Element_Fieldset, Varien_Data_Form_Element_File, Varien_Data_Form_Element_Gallery, Varien_Data_Form_Element_Hidden, Varien_Data_Form_Element_Image, Varien_Data_Form_Element_Imagefile, Varien_Data_Form_Element_Label, Varien_Data_Form_Element_Multiline, Varien_Data_Form_Element_Multiselect, Varien_Data_Form_Element_Note, Varien_Data_Form_Element_Password, Varien_Data_Form_Element_Radio, Varien_Data_Form_Element_Radios, Varien_Data_Form_Element_Reset, Varien_Data_Form_Element_Select, Varien_Data_Form_Element_Submit, Varien_Data_Form_Element_Text, Varien_Data_Form_Element_Textarea, Varien_Data_Form_Element_Time, and Varien_Data_Form.
Definition at line 57 of file Abstract.php.
00058 { 00059 parent::__construct($attributes); 00060 }
Enter description here...
array | $arrAttributes |
Reimplemented from Varien_Object.
Definition at line 181 of file Abstract.php.
00182 { 00183 $res = array(); 00184 $res['config'] = $this->getData(); 00185 $res['formElements']= array(); 00186 foreach ($this->getElements() as $element) { 00187 $res['formElements'][] = $element->toArray(); 00188 } 00189 return $res; 00190 }
addColumn | ( | $ | elementId, | |
$ | config | |||
) |
Enter description here...
string | $elementId | |
array | $config |
Definition at line 166 of file Abstract.php.
00167 { 00168 $element = new Varien_Data_Form_Element_Column($config); 00169 $element->setForm($this) 00170 ->setId($elementId); 00171 $this->addElement($element); 00172 return $element; 00173 }
addElement | ( | Varien_Data_Form_Element_Abstract $ | element, | |
$ | after = null | |||
) |
Add form element
Varien_Data_Form_Element_Abstract | $element |
Reimplemented in Varien_Data_Form_Element_Abstract, and Varien_Data_Form.
Definition at line 94 of file Abstract.php.
00095 { 00096 $element->setForm($this); 00097 $this->getElements()->add($element, $after); 00098 return $this; 00099 }
addField | ( | $ | elementId, | |
$ | type, | |||
$ | config, | |||
$ | after = false | |||
) |
Add child element
if $after parameter is false - then element adds to end of collection if $after parameter is null - then element adds to befin of collection if $after parameter is string - then element adds after of the element with some id
string | $elementId | |
string | $type | |
array | $config | |
mixed | $after |
Reimplemented in Varien_Data_Form_Element_Fieldset.
Definition at line 114 of file Abstract.php.
00115 { 00116 if (isset($this->_types[$type])) { 00117 $className = $this->_types[$type]; 00118 } 00119 else { 00120 $className = 'Varien_Data_Form_Element_'.ucfirst(strtolower($type)); 00121 } 00122 $element = new $className($config); 00123 $element->setId($elementId); 00124 if ($element->getRequired()) { 00125 $element->addClass('required-entry'); 00126 } 00127 $this->addElement($element, $after); 00128 return $element; 00129 }
addFieldset | ( | $ | elementId, | |
$ | config, | |||
$ | after = false | |||
) |
Enter description here...
string | $elementId | |
unknown_type | $config | |
unknown_type | $after |
Definition at line 151 of file Abstract.php.
00152 { 00153 $element = new Varien_Data_Form_Element_Fieldset($config); 00154 $element->setId($elementId); 00155 $this->addElement($element, $after); 00156 return $element; 00157 }
addType | ( | $ | type, | |
$ | className | |||
) |
Enter description here...
string | $type | |
string | $className |
Definition at line 69 of file Abstract.php.
getElements | ( | ) |
Enter description here...
Definition at line 80 of file Abstract.php.
00081 { 00082 if (empty($this->_elements)) { 00083 $this->_elements = new Varien_Data_Form_Element_Collection($this); 00084 } 00085 return $this->_elements; 00086 }
removeField | ( | $ | elementId | ) |
Enter description here...
string | $elementId |
Reimplemented in Varien_Data_Form_Element_Abstract, and Varien_Data_Form.
Definition at line 137 of file Abstract.php.
00138 { 00139 $this->getElements()->remove($elementId); 00140 return $this; 00141 }
$_elements [protected] |
$_types = array() [protected] |
Definition at line 50 of file Abstract.php.