3 final class AlmanacNetworkListController
4 extends AlmanacNetworkController
{
6 public function shouldAllowPublic() {
10 public function handleRequest(AphrontRequest
$request) {
11 $controller = id(new PhabricatorApplicationSearchController())
12 ->setQueryKey($request->getURIData('queryKey'))
13 ->setSearchEngine(new AlmanacNetworkSearchEngine())
14 ->setNavigation($this->buildSideNavView());
16 return $this->delegateToController($controller);
19 protected function buildApplicationCrumbs() {
20 $crumbs = parent
::buildApplicationCrumbs();
22 $can_create = $this->hasApplicationCapability(
23 AlmanacCreateNetworksCapability
::CAPABILITY
);
26 id(new PHUIListItemView())
27 ->setName(pht('Create Network'))
28 ->setHref($this->getApplicationURI('network/edit/'))
29 ->setIcon('fa-plus-square')
30 ->setDisabled(!$can_create)
31 ->setWorkflow(!$can_create));
36 public function buildSideNavView() {
37 $viewer = $this->getViewer();
39 $nav = new AphrontSideNavFilterView();
40 $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
42 id(new AlmanacNetworkSearchEngine())
44 ->addNavigationItems($nav->getMenu());
46 $nav->selectFilter(null);