[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/calendar/controller/ -> PhabricatorCalendarEventListController.php (source)

   1  <?php
   2  
   3  final class PhabricatorCalendarEventListController
   4    extends PhabricatorCalendarController {
   5  
   6    private $queryKey;
   7  
   8    public function shouldAllowPublic() {
   9      return true;
  10    }
  11  
  12    public function willProcessRequest(array $data) {
  13      $this->queryKey = idx($data, 'queryKey');
  14    }
  15  
  16    public function processRequest() {
  17      $controller = id(new PhabricatorApplicationSearchController())
  18        ->setQueryKey($this->queryKey)
  19        ->setSearchEngine(new PhabricatorCalendarEventSearchEngine())
  20        ->setNavigation($this->buildSideNav());
  21      return $this->delegateToController($controller);
  22    }
  23  
  24    public function buildSideNav() {
  25      $user = $this->getRequest()->getUser();
  26  
  27      $nav = new AphrontSideNavFilterView();
  28      $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
  29  
  30      id(new PhabricatorCalendarEventSearchEngine())
  31        ->setViewer($user)
  32        ->addNavigationItems($nav->getMenu());
  33  
  34      $nav->selectFilter(null);
  35  
  36      return $nav;
  37    }
  38  
  39  }


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