Path: blob/master/src/applications/harbormaster/controller/HarbormasterLintMessagesController.php
12256 views
<?php12final class HarbormasterLintMessagesController3extends HarbormasterController {45public function shouldAllowPublic() {6return true;7}89public function handleRequest(AphrontRequest $request) {10$viewer = $this->getViewer();1112$buildable = id(new HarbormasterBuildableQuery())13->setViewer($viewer)14->withIDs(array($request->getURIData('id')))15->needBuilds(true)16->needTargets(true)17->executeOne();18if (!$buildable) {19return new Aphront404Response();20}2122$id = $buildable->getID();2324$target_phids = array();25foreach ($buildable->getBuilds() as $build) {26foreach ($build->getBuildTargets() as $target) {27$target_phids[] = $target->getPHID();28}29}3031$lint_data = array();32if ($target_phids) {33$lint_data = id(new HarbormasterBuildLintMessage())->loadAllWhere(34'buildTargetPHID IN (%Ls)',35$target_phids);36} else {37$lint_data = array();38}3940$lint_table = id(new HarbormasterLintPropertyView())41->setUser($viewer)42->setLintMessages($lint_data);4344$lint = id(new PHUIObjectBoxView())45->setHeaderText(pht('Lint Messages'))46->appendChild($lint_table);4748$crumbs = $this->buildApplicationCrumbs();49$this->addBuildableCrumb($crumbs, $buildable);50$crumbs->addTextCrumb(pht('Lint'));51$crumbs->setBorder(true);5253$title = array(54$buildable->getMonogram(),55pht('Lint'),56);5758$header = id(new PHUIHeaderView())59->setHeader($title);6061$view = id(new PHUITwoColumnView())62->setHeader($header)63->setFooter(array(64$lint,65));6667return $this->newPage()68->setTitle($title)69->setCrumbs($crumbs)70->appendChild($view);7172}7374}757677