Path: blob/master/src/applications/almanac/controller/AlmanacNetworkListController.php
12256 views
<?php12final class AlmanacNetworkListController3extends AlmanacNetworkController {45public function shouldAllowPublic() {6return true;7}89public function handleRequest(AphrontRequest $request) {10$controller = id(new PhabricatorApplicationSearchController())11->setQueryKey($request->getURIData('queryKey'))12->setSearchEngine(new AlmanacNetworkSearchEngine())13->setNavigation($this->buildSideNavView());1415return $this->delegateToController($controller);16}1718protected function buildApplicationCrumbs() {19$crumbs = parent::buildApplicationCrumbs();2021$can_create = $this->hasApplicationCapability(22AlmanacCreateNetworksCapability::CAPABILITY);2324$crumbs->addAction(25id(new PHUIListItemView())26->setName(pht('Create Network'))27->setHref($this->getApplicationURI('network/edit/'))28->setIcon('fa-plus-square')29->setDisabled(!$can_create)30->setWorkflow(!$can_create));3132return $crumbs;33}3435public function buildSideNavView() {36$viewer = $this->getViewer();3738$nav = new AphrontSideNavFilterView();39$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));4041id(new AlmanacNetworkSearchEngine())42->setViewer($viewer)43->addNavigationItems($nav->getMenu());4445$nav->selectFilter(null);4647return $nav;48}495051}525354