[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/releeph/controller/ -> ReleephController.php (source)

   1  <?php
   2  
   3  abstract class ReleephController extends PhabricatorController {
   4  
   5    public function buildStandardPageResponse($view, array $data) {
   6      $page = $this->buildStandardPageView();
   7  
   8      $page->setApplicationName(pht('Releeph'));
   9      $page->setBaseURI('/releeph/');
  10      $page->setTitle(idx($data, 'title'));
  11      $page->setGlyph("\xD3\x82");
  12      $page->appendChild($view);
  13  
  14      $response = new AphrontWebpageResponse();
  15      return $response->setContent($page->render());
  16    }
  17  
  18    public function buildSideNavView($for_app = false) {
  19      $user = $this->getRequest()->getUser();
  20  
  21      $nav = new AphrontSideNavFilterView();
  22      $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
  23  
  24      if ($for_app) {
  25        $nav->addFilter('project/create/', pht('Create Product'));
  26      }
  27  
  28      id(new ReleephProductSearchEngine())
  29        ->setViewer($user)
  30        ->addNavigationItems($nav->getMenu());
  31  
  32      $nav->selectFilter(null);
  33  
  34      return $nav;
  35    }
  36  
  37    public function buildApplicationMenu() {
  38      return $this->buildSideNavView(true)->getMenu();
  39    }
  40  
  41  
  42    protected function getProductViewURI(ReleephProject $product) {
  43      return $this->getApplicationURI('project/'.$product->getID().'/');
  44    }
  45  
  46    protected function getBranchViewURI(ReleephBranch $branch) {
  47      return $this->getApplicationURI('branch/'.$branch->getID().'/');
  48    }
  49  
  50  }


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