脚本宝典收集整理的这篇文章主要介绍了php – 在Prestashop ModuleAdminController中添加自定义行操作,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图通过在RenderList函数上使用以下代码来添加它.但它没有用.
$this->addRowAction('download');
$this->addRowAction('export');
然后为这个动作创建链接,它正在使用displayExportLink()函数,你可以在下面的代码中看到
public function displayExportLink($token,$id) { $tpl = $this->createTemplate('list_action_export.tpl'); $tpl->assign(array( 'href' => self::$currentIndex.'&token='.$this->token.'& '.$this->identifier.'='.$id.'&export'.$this->table.'=1','action' => $this->l('Export') )); return $tpl->fetch(); }
然后你可以使用initProcess()函数或initcontent()函数获取你的新动作并做一些下载
public function initProcess() { parent::initProcess(); if (Tools::getValue('export'.$this->table)) { $this->display = 'export'; $this->action = 'export'; } }
以上是脚本宝典为你收集整理的php – 在Prestashop ModuleAdminController中添加自定义行操作全部内容,希望文章能够帮你解决php – 在Prestashop ModuleAdminController中添加自定义行操作所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。