public function delete($buildId)
    {
        $this->requireAdmin();

        $build = BuildFactory::getBuildById($buildId);

        if (empty($build)) {
            throw new NotFoundException(Lang::get('build_x_not_found', $buildId));
        }

        $this->buildService->deleteBuild($build);

        $response = new b8\Http\Response\RedirectResponse();
        $response->setHeader('Location', PHPCI_URL.'project/view/' . $build->getProjectId());
        return $response;
    }
public function delete($buildId)
    {
        $this->requireAdmin();

        $build = BuildFactory::getBuildById($buildId);

        if (empty($build)) {
            throw new NotFoundException(Lang::get('build_x_not_found', $buildId));
        }

        $this->buildService->deleteBuild($build);

        $response = new b8\Http\Response\RedirectResponse();
        $response->setHeader('Location', PHPCI_URL.'project/view/' . $build->getProjectId());
        return $response;
    }
public function delete ( $ buildId ) { $ this -> requireAdmin ( ) ; $ build = BuildFactory :: getBuildById ( $ buildId ) ; if ( empty ( $ build ) ) { throw new NotFoundException ( Lang :: get ( 'build_x_not_found' , $ buildId ) ) ; } $ this -> buildService -> deleteBuild ( $ build ) ; $ response = new b8 \ Http \ Response \ RedirectResponse ( ) ; $ response -> setHeader ( 'Location' , PHPCI_URL . 'project/view/' . $ build -> getProjectId ( ) ) ; return $ response ; }
Delete a build.
Delete a build .