public function view($projectId)
    {
        $project = $this->projectStore->getById($projectId);

        if (empty($project)) {
            throw new NotFoundException('Project with id: ' . $projectId . ' not found');
        }

        if (!$project->getAllowPublicStatus()) {
            throw new NotFoundException('Project with id: ' . $projectId . ' not found');
        }

        $builds = $this->getLatestBuilds($projectId);

        if (count($builds)) {
            $this->view->latest = $builds[0];
        }

        $this->view->builds = $builds;
        $this->view->project = $project;

        return $this->view->render();
    }
public function view($projectId)
    {
        $project = $this->projectStore->getById($projectId);

        if (empty($project)) {
            throw new NotFoundException('Project with id: ' . $projectId . ' not found');
        }

        if (!$project->getAllowPublicStatus()) {
            throw new NotFoundException('Project with id: ' . $projectId . ' not found');
        }

        $builds = $this->getLatestBuilds($projectId);

        if (count($builds)) {
            $this->view->latest = $builds[0];
        }

        $this->view->builds = $builds;
        $this->view->project = $project;

        return $this->view->render();
    }
public function view ( $ projectId ) { $ project = $ this -> projectStore -> getById ( $ projectId ) ; if ( empty ( $ project ) ) { throw new NotFoundException ( 'Project with id: ' . $ projectId . ' not found' ) ; } if ( ! $ project -> getAllowPublicStatus ( ) ) { throw new NotFoundException ( 'Project with id: ' . $ projectId . ' not found' ) ; } $ builds = $ this -> getLatestBuilds ( $ projectId ) ; if ( count ( $ builds ) ) { $ this -> view -> latest = $ builds [ 0 ] ; } $ this -> view -> builds = $ builds ; $ this -> view -> project = $ project ; return $ this -> view -> render ( ) ; }
View the public status page of a given project, if enabled.
@param $projectId
@return string
@throws \b8\Exception\HttpException\NotFoundException
View the public status page of a given project if enabled .