我正在尝试使用 Zend Framework 中的此功能重定向到同一页面,但我没有收到我在此功能中设置的 Flash 消息有人请帮助我
但是如果在执行此代码后单击其他结果,我可以看到该错误消息。
提前致谢....
public function deleteAction()
{
if( $this->_helper->getHelper('FlashMessenger')->getMessages()) {
$this->view->message = $this->_helper->getHelper('FlashMessenger')->getMessages();
}
$this->_helper->viewRenderer->setNoRender(true);
$this->_helper->layout()->disableLayout();
if($this->getRequest()->getParam('id')){
$surfaceReservation = Doctrine_Core::getTable('Model_Reservation')->findOneById($this->getRequest()->getParam('id'));
if($surfaceReservation) $surfaceReservation->delete();
$this->_helper->getHelper('FlashMessenger')->addMessage('Deleted Successfully');
}
$this->_redirect('/arena/surface/reservation');
}