/** * Deletes a acceso * * @param string $acceso_id */ public function deleteAction($acceso_id) { $acceso = Acceso::findFirstByacceso_id($acceso_id); if (!$acceso) { $this->flash->error("acceso was not found"); return $this->dispatcher->forward(array("controller" => "acceso", "action" => "index")); } if (!$acceso->delete()) { foreach ($acceso->getMessages() as $message) { $this->flash->error($message); } return $this->dispatcher->forward(array("controller" => "acceso", "action" => "search")); } $this->flash->success("acceso was deleted successfully"); return $this->dispatcher->forward(array("controller" => "acceso", "action" => "index")); }