Public Member Functions | |
__construct () | |
getSaveButtonHtml () | |
getSaveUrl () | |
initForm () | |
Public Attributes | |
const | DEFAULT_SECTION_BLOCK = 'adminhtml/system_config_form' |
Protected Member Functions | |
_prepareLayout () | |
Protected Attributes | |
$_section |
Definition at line 34 of file Edit.php.
__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 }
_prepareLayout | ( | ) | [protected] |
Preparing global layout
You can redefine this method in child classes for changin layout
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 | ( | ) |
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 }
const DEFAULT_SECTION_BLOCK = 'adminhtml/system_config_form' |