覆盖Magento Customer Grid以添加自定义行类

时间:2013-06-12 19:59:55

标签: magento

问题:我正在尝试覆盖Mage_Adminhtml_Block_Widget_Grid

代码:

config.xml中

<global>
        <blocks>
            <adminhtmlext>
                <class>Blizzardlabs_Adminhtmlext_Block</class>
            </adminhtmlext>
            <adminhtml>
                <rewrite>
                    <widget_grid>Blizzardlabs_Adminhtmlext_Adminhtml_Block_Widget_Grid</widget_grid>
                </rewrite>
            </adminhtml>
        </blocks>
</global>

Adminhtml /砌块/空间/ Grid.php

class Blizzardlabs_Adminhtmlext_Adminhtml_Block_Widget_Grid extends Mage_Adminhtml_Block_Widget_Grid
{

    public function getRowClass(Varien_Object $row)
    {die();
        return $row->getCustomerActivated() ? 'user-active' : 'user-inactive';        
    }
}

我似乎无法让这个工作......请帮忙

0 个答案:

没有答案