我试图覆盖块 Mage_Adminhtml_Block_Catalog_Product_Edit 并以这种方式创建按钮“delete_cache_product”:
protected function _prepareLayout()
{
parent::_prepareLayout();
$this->_product = $this->getProduct();
$this->setChild('delete_cache_product',
$this->getLayout()->createBlock('adminhtml/widget_button')
->setData(array(
'label' => Mage::helper('catalog')->__('delete cache'),
'onclick' => 'confirmSetLocation(\''.Mage::helper('catalog')->__('Are you sure?').'\', \''.$this->getDeleteCacheProductUrl().'\')',
'title' => Mage::helper('catalog')->__('Delete product cache?')
))
);
return $this;
}
问题是如何为该按钮关联资源acl,以便只有有权访问此类资源的用户才能看到该按钮???