我做了一个触发事件的观察者adminhtml_block_html_before
,但是当我尝试删除选项卡时没有任何反应。这是代码:
public function alterMenu($observer) {
$block = $observer->getBlock();
if ($block instanceof Mage_Adminhtml_Block_Sales_Order_View_Tabs)
$block->removeTab('order_rma');
}
之后,如果我使用print_r($block->getTabsIds());
有以下情况:
Array
(
[0] => order_info
[1] => order_invoices
[2] => order_creditmemos
[3] => order_shipments
[4] => order_history
[5] => order_transactions
)
但该选项卡仍然可见。我正在使用 Magento EE 1.12。有什么建议么?
谢谢!