我试图在我的扩展程序中覆盖 Mage_Adminhtml_Block_Widget_Form 但我似乎无法让它工作。
我的配置看起来像这样
<global>
<blocks>
<adminhtml>
<rewrite>
<widget_form>Baldwin_TestModule_Block_Adminhtml_Widget_Form</widget_form>
</rewrite>
</adminhtml>
</blocks>
</global>
我的覆盖类(在目录中:Baldwin/TestModule/Block/Adminhtml/Widget/Form.php)看起来像这样
class Baldwin_TestModule_Block_Adminhtml_Widget_Form
extends Mage_Adminhtml_Block_Widget_Form
{
/**
* Set Fieldset to Form
*
* @param array $attributes attributes that are to be added
* @param Varien_Data_Form_Element_Fieldset $fieldset
* @param array $exclude attributes that should be skipped
*/
protected function _setFieldset($attributes, $fieldset, $exclude=array())
{
die("test");
}
}
有人知道我做错了什么吗?