*/ class Mage_Adminhtml_Block_Cms_Page extends Mage_Adminhtml_Block_Widget_Grid_Container { /** * Block constructor */ public function __construct() { $this->_controller = 'cms_page'; $this->_headerText = Mage::helper('cms')->__('Manage Pages'); parent::__construct(); if ($this->_isAllowedAction('save')) { $this->_updateButton('add', 'label', Mage::helper('cms')->__('Add New Page')); } else { $this->_removeButton('add'); } } /** * Check permission for passed action * * @param string $action * @return bool */ protected function _isAllowedAction($action) { return Mage::getSingleton('admin/session')->isAllowed('cms/page/' . $action); } }