sprintService = $sprintService; } /** * Displays the delete sprint confirmation. * * @param array $params Request parameters */ #[RequiresPermission(SprintsPermissions::VIEW)] public function get(array $params): Response { $id = (int) ($params['id'] ?? $_GET['id'] ?? 0); $this->tpl->assign('id', $id); return $this->tpl->displayPartial('sprints.delSprint'); } /** * Handles sprint deletion. * * @param array $params Request parameters */ #[RequiresPermission(SprintsPermissions::DELETE)] public function post(array $params): Response { $id = (int) ($params['id'] ?? $_GET['id'] ?? 0); if (isset($_POST['del']) && $id > 0) { $this->sprintService->deleteSprint($id); $this->tpl->setNotification($this->language->__('notifications.sprint_deleted_successfully'), 'success'); if (session()->exists('lastPage')) { return Frontcontroller::redirect(session('lastPage')); } return Frontcontroller::redirect(BASE_URL.'/tickets/showKanban'); } $this->tpl->assign('id', $id); return $this->tpl->displayPartial('sprints.delSprint'); } }