public function removeAction() { if (!($seo = $this->loadObject($this->seoService, "Seo doesn't exist."))) { return $this->redirect()->toRoute('seo', array('action' => 'list')); } if ($this->request->isPost()) { $del = $this->request->getPost('del', 'No'); if ($del == 'Yes') { $this->seoService->remove($seo); $this->flashMessenger()->addSuccessMessage('Seo record has been removed.'); } return $this->redirect()->toRoute('seo', array('action' => 'list')); } $view = new ViewModel(array('seo' => $seo)); $view->setTerminal(true); return $view; }