Php 模块方法postProcess()不';无法预测到管理员页面
当我单击HelpPerform from页面的save按钮时,后处理会启动良好,但用户不会返回到我的模块管理页面,而是停留在编辑页面上Php 模块方法postProcess()不';无法预测到管理员页面,php,prestashop,prestashop-1.7,Php,Prestashop,Prestashop 1.7,当我单击HelpPerform from页面的save按钮时,后处理会启动良好,但用户不会返回到我的模块管理页面,而是停留在编辑页面上 public function postProcess() { if (Tools::isSubmit('submitTest')) { //Entries here works well when the helperform is send return; //The admin user stays on edit
public function postProcess()
{
if (Tools::isSubmit('submitTest')) {
//Entries here works well when the helperform is send
return; //The admin user stays on edit page instead of going back to my module config page
}
return false;
}
public function getContent()
{
if(Tools::isSubmit('updatemyModule') || Tools::isSubmit('submitTest')) {
return $this->postProcess().$this->renderForm();
}
else {
return $this->listform();
}
}
由于令牌是由主类检查的,所以我只需在后处理函数的末尾调用
listform
方法
public function postProcess()
{
if (Tools::isSubmit('submitTest')) {
//Entries here works well when the helperform is send
return $this->listform(); //reset the context states so it goes back to mymodule config page
}
return false;
}