public function __construct()
 {
     parent::__construct();
     $this->setTemplate('system/config/edit.phtml');
     $sectionCode = $this->getRequest()->getParam('section');
     $sections = Mage::getSingleton('adminhtml/config')->getSections();
     $this->_section = $sections->{$sectionCode};
     $this->setTitle((string) $this->_section->label);
 }
Exemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
     $sectionCode = $this->getRequest()->getParam('section');
     $sections = Mage::getSingleton('adminhtml/config')->getSections();
     $session = Mage::getSingleton('admin/session');
     if (false !== strpos($sectionCode, 'mageworx')) {
         $groups = $this->_section->groups[0];
         foreach ($groups as $group => $object) {
             if (!$session->isAllowed("system/config/{$sectionCode}/{$group}")) {
                 $sections->{$sectionCode}->groups->{$group} = null;
             }
         }
     }
     $this->_section = $sections->{$sectionCode};
     $this->setTitle((string) $this->_section->label);
 }