This should be so simple, but _removeButton() method is not working.
class Thing_MyModule_Block_Adminhtml_Foo
extends Mage_Adminhtml_Block_Widget_Grid_Container {
public function _construct() {
$this->_controller = 'adminhtml_mymodule';
$this->_blockGroup = 'mymodule';
$this->_headerText = Mage::helper('mymodule')->__('Hello There');
parent::_construct();
$this->_removeButton('add'); // does not work
}
}
Needless to say I'm missing something obvious and the "+ Add New" button is still there. Yes, I have tried it before and after the call to parent::_construct();
If I do var_dump($this->_buttons);
I get
array (size=3)
-1 =>
array (size=0)
empty
0 =>
array (size=0)
empty
1 =>
array (size=0)
empty
...which makes no sense to me. AM LOSING MY MIND! Please help!
Magento ver. 1.8.1.0