Mage_Adminhtml_Block_System_Config_Form_Fieldset_Modules_DisableOutput Class Reference

Inheritance diagram for Mage_Adminhtml_Block_System_Config_Form_Fieldset_Modules_DisableOutput:

Mage_Adminhtml_Block_System_Config_Form_Fieldset Mage_Adminhtml_Block_Abstract Varien_Data_Form_Element_Renderer_Interface Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 render (Varien_Data_Form_Element_Abstract $element)

Protected Member Functions

 _getDummyElement ()
 _getFieldRenderer ()
 _getValues ()
 _getFieldHtml ($fieldset, $moduleName)

Protected Attributes

 $_dummyElement
 $_fieldRenderer
 $_values


Detailed Description

Definition at line 28 of file DisableOutput.php.


Member Function Documentation

_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

Parameters:
Varien_Data_Form_Element_Abstract $element
Returns:
string

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     }


Member Data Documentation

$_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.


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

Generated on Sat Jul 4 17:23:03 2009 for Magento by  doxygen 1.5.8