[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

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

   1  <?php
   2  
   3  final class ReleephProductListController extends ReleephController {
   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 ReleephProductSearchEngine())
  19        ->setNavigation($this->buildSideNavView());
  20  
  21      return $this->delegateToController($controller);
  22    }
  23  
  24    public function buildApplicationCrumbs() {
  25      $crumbs = parent::buildApplicationCrumbs();
  26  
  27      $crumbs->addAction(
  28        id(new PHUIListItemView())
  29          ->setName(pht('Create Product'))
  30          ->setHref($this->getApplicationURI('product/create/'))
  31          ->setIcon('fa-plus-square'));
  32  
  33      return $crumbs;
  34    }
  35  
  36  }


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