[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

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

   1  <?php
   2  
   3  final class HarbormasterPlanListController extends HarbormasterPlanController {
   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 HarbormasterBuildPlanSearchEngine())
  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      if ($for_app) {
  31        $nav->addFilter('new/', pht('New Build Plan'));
  32      }
  33  
  34      id(new HarbormasterBuildPlanSearchEngine())
  35        ->setViewer($user)
  36        ->addNavigationItems($nav->getMenu());
  37  
  38      $nav->selectFilter(null);
  39  
  40      return $nav;
  41    }
  42  
  43    public function buildApplicationMenu() {
  44      return $this->buildSideNavView(true)->getMenu();
  45    }
  46  
  47  }


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