Mage_Adminhtml_Block_System_Config_Edit Class Reference

Inheritance diagram for Mage_Adminhtml_Block_System_Config_Edit:

Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getSaveButtonHtml ()
 getSaveUrl ()
 initForm ()

Public Attributes

const DEFAULT_SECTION_BLOCK = 'adminhtml/system_config_form'

Protected Member Functions

 _prepareLayout ()

Protected Attributes

 $_section


Detailed Description

Definition at line 34 of file Edit.php.


Constructor & Destructor Documentation

__construct (  ) 

Constructor

By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes

Reimplemented from Varien_Object.

Definition at line 40 of file Edit.php.

00041     {
00042         parent::__construct();
00043         $this->setTemplate('system/config/edit.phtml');
00044 
00045         $sectionCode = $this->getRequest()->getParam('section');
00046         $sections = Mage::getSingleton('adminhtml/config')->getSections();
00047 
00048         $this->_section = $sections->$sectionCode;
00049 
00050         $this->setTitle((string)$this->_section->label);
00051     }


Member Function Documentation

_prepareLayout (  )  [protected]

Preparing global layout

You can redefine this method in child classes for changin layout

Returns:
Mage_Core_Block_Abstract

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 53 of file Edit.php.

00054     {
00055         $this->setChild('save_button',
00056             $this->getLayout()->createBlock('adminhtml/widget_button')
00057                 ->setData(array(
00058                     'label'     => Mage::helper('adminhtml')->__('Save Config'),
00059                     'onclick'   => 'configForm.submit()',
00060                     'class' => 'save',
00061                 ))
00062         );
00063         return parent::_prepareLayout();
00064     }

getSaveButtonHtml (  ) 

Definition at line 66 of file Edit.php.

00067     {
00068         return $this->getChildHtml('save_button');
00069     }

getSaveUrl (  ) 

Definition at line 71 of file Edit.php.

00072     {
00073         return $this->getUrl('*/*/save', array('_current'=>true));
00074     }

initForm (  ) 

Definition at line 76 of file Edit.php.

00077     {
00078         /*
00079         $this->setChild('dwstree',
00080             $this->getLayout()->createBlock('adminhtml/system_config_dwstree')
00081                 ->initTabs()
00082         );
00083         */
00084 
00085         $blockName = (string)$this->_section->frontend_model;
00086         if (empty($blockName)) {
00087             $blockName = self::DEFAULT_SECTION_BLOCK;
00088         }
00089         $this->setChild('form',
00090             $this->getLayout()->createBlock($blockName)
00091                 ->initForm()
00092         );
00093         return $this;
00094     }


Member Data Documentation

$_section [protected]

Definition at line 38 of file Edit.php.

const DEFAULT_SECTION_BLOCK = 'adminhtml/system_config_form'

Definition at line 36 of file Edit.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