如何轻松覆盖和使用Mage_Eav_Model_Entity_Collection_Abstract?

时间:2011-03-11 11:50:03

标签: php collections magento model override

为了找到my previous question的解决方案,我想覆盖Mage_Eav_Model_Entity_Collection_Abstract我知道我可以将其从core/复制到local/,但这会进一步突破更新。

所以我想扩展它。

如果我该怎么做?

我对Magento的扩展完全不熟悉,如果不破坏现有代码,我不能完全确定这一点。

1 个答案:

答案 0 :(得分:2)

很抱歉,您不能覆盖抽象类,因为使用它们的类直接链接到它们 e.g。

My_Collection扩展Mage_Eav_Model_Entity_Collection_Abstract

你只能覆盖使用Mage :: getResourceModel()或Mage :: getModel()初始化的类,...

对于你的问题你不需要这样做我想......