Public Member Functions | |
__construct () | |
Protected Member Functions | |
_beforeToHtml () |
Definition at line 27 of file Editroles.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 28 of file Editroles.php.
00029 { 00030 parent::__construct(); 00031 $this->setId('role_info_tabs'); 00032 $this->setDestElementId('role_edit_form'); 00033 $this->setTitle(Mage::helper('adminhtml')->__('Role Information')); 00034 }
_beforeToHtml | ( | ) | [protected] |
Before rendering html, but after trying to load cache
Reimplemented from Mage_Adminhtml_Block_Widget_Tabs.
Definition at line 36 of file Editroles.php.
00037 { 00038 $roleId = $this->getRequest()->getParam('rid', false); 00039 $role = Mage::getModel("api/roles") 00040 ->load($roleId); 00041 00042 $this->addTab('info', array( 00043 'label' => Mage::helper('adminhtml')->__('Role Info'), 00044 'title' => Mage::helper('adminhtml')->__('Role Info'), 00045 'content' => $this->getLayout()->createBlock('adminhtml/api_tab_roleinfo')->setRole($role)->toHtml(), 00046 'active' => true 00047 )); 00048 00049 $this->addTab('account', array( 00050 'label' => Mage::helper('adminhtml')->__('Role Resources'), 00051 'title' => Mage::helper('adminhtml')->__('Role Resources'), 00052 'content' => $this->getLayout()->createBlock('adminhtml/api_tab_rolesedit')->toHtml(), 00053 )); 00054 00055 if( intval($roleId) > 0 ) { 00056 $this->addTab('roles', array( 00057 'label' => Mage::helper('adminhtml')->__('Role Users'), 00058 'title' => Mage::helper('adminhtml')->__('Role Users'), 00059 'content' => $this->getLayout()->createBlock('adminhtml/api_tab_rolesusers', 'role.users.grid')->toHtml(), 00060 )); 00061 } 00062 return parent::_beforeToHtml(); 00063 }