3 final class PhabricatorSpacesListController
4 extends PhabricatorSpacesController
{
6 public function shouldAllowPublic() {
10 public function handleRequest(AphrontRequest
$request) {
11 $request = $this->getRequest();
12 $controller = id(new PhabricatorApplicationSearchController())
13 ->setQueryKey($request->getURIData('queryKey'))
14 ->setSearchEngine(new PhabricatorSpacesNamespaceSearchEngine())
15 ->setNavigation($this->buildSideNavView());
17 return $this->delegateToController($controller);
20 public function buildSideNavView($for_app = false) {
21 $user = $this->getRequest()->getUser();
23 $nav = new AphrontSideNavFilterView();
24 $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
26 id(new PhabricatorSpacesNamespaceSearchEngine())
28 ->addNavigationItems($nav->getMenu());
30 $nav->selectFilter(null);
35 protected function buildApplicationCrumbs() {
36 $crumbs = parent
::buildApplicationCrumbs();
38 $can_create = $this->hasApplicationCapability(
39 PhabricatorSpacesCapabilityCreateSpaces
::CAPABILITY
);
42 id(new PHUIListItemView())
43 ->setName(pht('Create Space'))
44 ->setHref($this->getApplicationURI('create/'))
45 ->setIcon('fa-plus-square')
46 ->setDisabled(!$can_create)
47 ->setWorkflow(!$can_create));