Mage_Adminhtml_Block_System_Config_Form_Fieldset Class Reference

Inheritance diagram for 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 Mage_Adminhtml_Block_System_Config_Form_Fieldset_Modules_DisableOutput Mage_Adminhtml_Block_System_Config_Form_Fieldset_Order_Statuses

List of all members.

Public Member Functions

 render (Varien_Data_Form_Element_Abstract $element)

Protected Member Functions

 _getHeaderHtml ($element)
 _getFooterHtml ($element)
 _getCollapseState ($element)


Detailed Description

Definition at line 35 of file Fieldset.php.


Member Function Documentation

_getCollapseState ( element  )  [protected]

Definition at line 99 of file Fieldset.php.

00100     {
00101         $extra = Mage::getSingleton('admin/session')->getUser()->getExtra();
00102         if (isset($extra['configState'][$element->getId()])) {
00103             return $extra['configState'][$element->getId()];
00104         }
00105         return false;
00106     }

_getFooterHtml ( element  )  [protected]

Enter description here...

Parameters:
Varien_Data_Form_Element_Abstract $element
Returns:
string

Definition at line 93 of file Fieldset.php.

00094     {
00095         $html = '</tbody></table></fieldset>' . Mage::helper('adminhtml/js')->getScript("Fieldset.applyCollapse('{$element->getHtmlId()}')");
00096         return $html;
00097     }

_getHeaderHtml ( element  )  [protected]

Enter description here...

Parameters:
Varien_Data_Form_Element_Abstract $element
Returns:
string

Definition at line 65 of file Fieldset.php.

00066     {
00067         $default = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store');
00068 
00069         $html = '<div  class="entry-edit-head collapseable" ><a id="'.$element->getHtmlId().'-head" href="#" onclick="Fieldset.toggleCollapse(\''.$element->getHtmlId().'\', \''.$this->getUrl('*/*/state').'\'); return false;">'.$element->getLegend().'</a></div>';
00070         $html.= '<input id="'.$element->getHtmlId().'-state" name="config_state['.$element->getId().']" type="hidden" value="'.(int)$this->_getCollapseState($element).'" />';
00071         $html.= '<fieldset class="config collapseable" id="'.$element->getHtmlId().'">';
00072         $html.= '<legend>'.$element->getLegend().'</legend>';
00073 
00074         if ($element->getComment()) {
00075             $html .= '<div class="comment">'.$element->getComment().'</div>';
00076         }
00077         // field label column
00078         $html.= '<table cellspacing="0" class="form-list"><colgroup class="label" /><colgroup class="value" />';
00079         if (!$default) {
00080             $html.= '<colgroup class="use-default" />';
00081         }
00082         $html.= '<tbody>';
00083 
00084         return $html;
00085     }

render ( Varien_Data_Form_Element_Abstract element  ) 

Render fieldset html

Parameters:
Varien_Data_Form_Element_Abstract $element
Returns:
string

Implements Varien_Data_Form_Element_Renderer_Interface.

Reimplemented in Mage_Adminhtml_Block_System_Config_Form_Fieldset_Modules_DisableOutput, and Mage_Adminhtml_Block_System_Config_Form_Fieldset_Order_Statuses.

Definition at line 46 of file Fieldset.php.

00047     {
00048         $html = $this->_getHeaderHtml($element);
00049 
00050         foreach ($element->getElements() as $field) {
00051             $html.= $field->toHtml();
00052         }
00053 
00054         $html .= $this->_getFooterHtml($element);
00055 
00056         return $html;
00057     }


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