3 final class DrydockAuthorizationListController
4 extends DrydockController
{
8 public function setBlueprint(DrydockBlueprint
$blueprint) {
9 $this->blueprint
= $blueprint;
13 public function getBlueprint() {
14 return $this->blueprint
;
17 public function shouldAllowPublic() {
21 public function handleRequest(AphrontRequest
$request) {
22 $viewer = $this->getViewer();
24 $engine = new DrydockAuthorizationSearchEngine();
26 $id = $request->getURIData('id');
28 $blueprint = id(new DrydockBlueprintQuery())
33 return new Aphront404Response();
36 $this->setBlueprint($blueprint);
37 $engine->setBlueprint($blueprint);
39 $querykey = $request->getURIData('queryKey');
41 $controller = id(new PhabricatorApplicationSearchController())
42 ->setQueryKey($querykey)
43 ->setSearchEngine($engine)
44 ->setNavigation($this->buildSideNavView());
46 return $this->delegateToController($controller);
49 public function buildSideNavView() {
50 $nav = new AphrontSideNavFilterView();
51 $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
53 $engine = id(new DrydockAuthorizationSearchEngine())
54 ->setViewer($this->getViewer());
56 $engine->setBlueprint($this->getBlueprint());
57 $engine->addNavigationItems($nav->getMenu());
59 $nav->selectFilter(null);
64 protected function buildApplicationCrumbs() {
65 $crumbs = parent
::buildApplicationCrumbs();
67 $blueprint = $this->getBlueprint();
69 $id = $blueprint->getID();
71 $crumbs->addTextCrumb(
73 $this->getApplicationURI('blueprint/'));
75 $crumbs->addTextCrumb(
76 $blueprint->getBlueprintName(),
77 $this->getApplicationURI("blueprint/{$id}/"));
79 $crumbs->addTextCrumb(
80 pht('Authorizations'),
81 $this->getApplicationURI("blueprint/{$id}/authorizations/"));