使用此代码
public function __construct()
{
$this->_objectId = 'item_id';
$this->_blockGroup = 'countingstars';
$this->_controller = 'adminhtml_item';
$this->_updateButton('save', 'label', Mage::helper('countingstars')->__('Submit'));
parent::__construct();
$this->_removeButton('delete');
}
但是我无法正常工作。
答案 0 :(得分:0)
最后使它生效,_updateButton()应该放在_construct()之后。因此,代码应如下所示:
public function __construct()
{
$this->_objectId = 'item_id';
$this->_blockGroup = 'countingstars';
$this->_controller = 'adminhtml_item';
parent::__construct();
$this->_removeButton('delete');
$this->_updateButton('save', 'label', Mage::helper('countingstars')->__('Submit'));
}