public function showAction() { $id = $this->params('id'); $societe = $this->societeService->find($id); if (!$societe) { return $this->createHttpNotFoundModel($this->response); } return new ViewModel(['societe' => $societe]); }
public function deleteAction() { if ($this->request->isPost()) { if ($this->request->getPost('confirm') === 'oui') { $id = $this->params('id'); $this->contactService->delete($id); } return $this->redirect()->toRoute('address-book-contact'); } return $this->showAction(); }