/** * Initialize form * * @return Mage_Backend_Block_System_Config_Form */ public function initForm() { $this->_initObjects(); /** @var Varien_Data_Form $form */ $form = $this->_formFactory->create(); $section = $this->_systemConfig->getSection($this->getSectionCode(), $this->getWebsiteCode(), $this->getStoreCode()); if (!empty($section) && false !== $this->_canShowField($section)) { $groups = $section['groups']; usort($groups, array($this, '_sortForm')); foreach ($groups as $group) { /* @var $group array */ if (false == $this->_canShowField($group)) { continue; } $this->_initGroup($group, $section, $form); } } $this->setForm($form); return $this; }
/** * Initialize form * * @return Mage_Backend_Block_System_Config_Form */ public function initForm() { $this->_initObjects(); /** @var Varien_Data_Form $form */ $form = $this->_formFactory->create(); /** @var $section Mage_Backend_Model_Config_Structure_Element_Section */ $section = $this->_configStructure->getElement($this->getSectionCode()); if ($section && $section->isVisible($this->getWebsiteCode(), $this->getStoreCode())) { foreach ($section->getChildren() as $group) { $this->_initGroup($group, $section, $form); } } $this->setForm($form); return $this; }