您的位置:首页 > 其它

delete-----magento后台数据信息删除----------

2011-01-28 21:39 302 查看
在grid里面实现这个方法:

protected function _prepareMassaction()

{

$this->setMassactionIdField('post_id');

$this->getMassactionBlock()->setFormFieldName('blog');

$this->getMassactionBlock()->addItem('delete', array(

'label' => Mage::helper('gao')->__('Delete'),

'url' => $this->getUrl('*/*/massDelete'),

'confirm' => Mage::helper('gao')->__('Are you sure?')

));

$statuses = Mage::getSingleton('blog/status')->getOptionArray();

array_unshift($statuses, array('label'=>'', 'value'=>''));

$this->getMassactionBlock()->addItem('status', array(

'label'=> Mage::helper('blog')->__('Change status'),

'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),

'additional' => array(

'visibility' => array(

'name' => 'status',

'type' => 'select',

'class' => 'required-entry',

'label' => Mage::helper('blog')->__('Status'),

'values' => $statuses

)

)

));

return $this;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: