[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/harbormaster/controller/ -> HarbormasterBuildableListController.php (source)

   1  <?php
   2  
   3  final class HarbormasterBuildableListController extends HarbormasterController {
   4  
   5    private $queryKey;
   6  
   7    public function shouldAllowPublic() {
   8      return true;
   9    }
  10  
  11    public function willProcessRequest(array $data) {
  12      $this->queryKey = idx($data, 'queryKey');
  13    }
  14  
  15    public function processRequest() {
  16      $controller = id(new PhabricatorApplicationSearchController())
  17        ->setQueryKey($this->queryKey)
  18        ->setSearchEngine(new HarbormasterBuildableSearchEngine())
  19        ->setNavigation($this->buildSideNavView());
  20  
  21      return $this->delegateToController($controller);
  22    }
  23  
  24    public function buildSideNavView($for_app = false) {
  25      $user = $this->getRequest()->getUser();
  26  
  27      $nav = new AphrontSideNavFilterView();
  28      $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
  29  
  30      id(new HarbormasterBuildableSearchEngine())
  31        ->setViewer($user)
  32        ->addNavigationItems($nav->getMenu());
  33  
  34      $nav->addLabel(pht('Build Plans'));
  35      $nav->addFilter('plan/', pht('Manage Build Plans'));
  36  
  37      $nav->selectFilter(null);
  38  
  39      return $nav;
  40    }
  41  
  42    public function buildApplicationMenu() {
  43      return $this->buildSideNavView(true)->getMenu();
  44    }
  45  
  46  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1