/** * Deletes a acceso * * @param string $idacceso */ public function deleteAction($idacceso) { $acceso = Acceso::findFirstByidacceso($idacceso); 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")); }