Public Member Functions | |
render (Varien_Data_Form_Element_Abstract $element) | |
Protected Member Functions | |
_getDummyElement () | |
_getFieldRenderer () | |
_getValues () | |
_getFieldHtml ($fieldset, $moduleName) | |
Protected Attributes | |
$_dummyElement | |
$_fieldRenderer | |
$_values |
Definition at line 28 of file DisableOutput.php.
_getDummyElement | ( | ) | [protected] |
Definition at line 54 of file DisableOutput.php.
00055 { 00056 if (empty($this->_dummyElement)) { 00057 $this->_dummyElement = new Varien_Object(array('show_in_default'=>1, 'show_in_website'=>1)); 00058 } 00059 return $this->_dummyElement; 00060 }
_getFieldHtml | ( | $ | fieldset, | |
$ | moduleName | |||
) | [protected] |
Definition at line 81 of file DisableOutput.php.
00082 { 00083 $configData = $this->getConfigData(); 00084 $path = 'advanced/modules_disable_output/'.$moduleName; //TODO: move as property of form 00085 $data = isset($configData[$path]) ? $configData[$path] : array(); 00086 00087 $e = $this->_getDummyElement(); 00088 00089 $field = $fieldset->addField($moduleName, 'select', 00090 array( 00091 'name' => 'groups[modules_disable_output][fields]['.$moduleName.'][value]', 00092 'label' => $moduleName, 00093 'value' => $data, 00094 'values' => $this->_getValues(), 00095 'inherit' => isset($configData[$path]) ? false : true, 00096 'can_use_default_value' => $this->getForm()->canUseDefaultValue($e), 00097 'can_use_website_value' => $this->getForm()->canUseWebsiteValue($e), 00098 ))->setRenderer($this->_getFieldRenderer()); 00099 00100 return $field->toHtml(); 00101 }
_getFieldRenderer | ( | ) | [protected] |
Definition at line 62 of file DisableOutput.php.
00063 { 00064 if (empty($this->_fieldRenderer)) { 00065 $this->_fieldRenderer = Mage::getBlockSingleton('adminhtml/system_config_form_field'); 00066 } 00067 return $this->_fieldRenderer; 00068 }
_getValues | ( | ) | [protected] |
Definition at line 70 of file DisableOutput.php.
00071 { 00072 if (empty($this->_values)) { 00073 $this->_values = array( 00074 array('label'=>Mage::helper('adminhtml')->__('Enable'), 'value'=>0), 00075 array('label'=>Mage::helper('adminhtml')->__('Disable'), 'value'=>1), 00076 ); 00077 } 00078 return $this->_values; 00079 }
render | ( | Varien_Data_Form_Element_Abstract $ | element | ) |
Render fieldset html
Varien_Data_Form_Element_Abstract | $element |
Reimplemented from Mage_Adminhtml_Block_System_Config_Form_Fieldset.
Definition at line 35 of file DisableOutput.php.
00036 { 00037 $html = $this->_getHeaderHtml($element); 00038 00039 $modules = array_keys((array)Mage::getConfig()->getNode('modules')->children()); 00040 00041 sort($modules); 00042 00043 foreach ($modules as $moduleName) { 00044 if ($moduleName==='Mage_Adminhtml') { 00045 continue; 00046 } 00047 $html.= $this->_getFieldHtml($element, $moduleName); 00048 } 00049 $html .= $this->_getFooterHtml($element); 00050 00051 return $html; 00052 }
$_dummyElement [protected] |
Definition at line 31 of file DisableOutput.php.
$_fieldRenderer [protected] |
Definition at line 32 of file DisableOutput.php.
$_values [protected] |
Definition at line 33 of file DisableOutput.php.