[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/herald/controller/ -> HeraldTranscriptListController.php (source)

   1  <?php
   2  
   3  final class HeraldTranscriptListController extends HeraldController {
   4  
   5    private $queryKey;
   6  
   7    public function buildSideNavView($for_app = false) {
   8      $user = $this->getRequest()->getUser();
   9  
  10      $nav = new AphrontSideNavFilterView();
  11      $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
  12  
  13      if ($for_app) {
  14        $nav->addFilter('new', pht('Create Rule'));
  15      }
  16  
  17      id(new HeraldTranscriptSearchEngine())
  18        ->setViewer($user)
  19        ->addNavigationItems($nav->getMenu());
  20  
  21      $nav->selectFilter(null);
  22  
  23      return $nav;
  24    }
  25  
  26    public function buildApplicationCrumbs() {
  27      $crumbs = parent::buildApplicationCrumbs();
  28  
  29      $crumbs->addTextCrumb(
  30        pht('Transcripts'),
  31        $this->getApplicationURI('transcript/'));
  32      return $crumbs;
  33    }
  34  
  35    public function willProcessRequest(array $data) {
  36      $this->queryKey = idx($data, 'queryKey');
  37    }
  38  
  39    public function processRequest() {
  40      $controller = id(new PhabricatorApplicationSearchController())
  41        ->setQueryKey($this->queryKey)
  42        ->setSearchEngine(new HeraldTranscriptSearchEngine())
  43        ->setNavigation($this->buildSideNavView());
  44  
  45      return $this->delegateToController($controller);
  46    }
  47  
  48  }


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