Differential D16283 Diff 39170 src/applications/calendar/controller/PhabricatorCalendarEventListController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/calendar/controller/PhabricatorCalendarEventListController.php
Show All 13 Lines | public function handleRequest(AphrontRequest $request) { | ||||
$engine = new PhabricatorCalendarEventSearchEngine(); | $engine = new PhabricatorCalendarEventSearchEngine(); | ||||
if ($month && $year) { | if ($month && $year) { | ||||
$engine->setCalendarYearAndMonthAndDay($year, $month, $day); | $engine->setCalendarYearAndMonthAndDay($year, $month, $day); | ||||
} | } | ||||
$controller = id(new PhabricatorApplicationSearchController()) | $controller = id(new PhabricatorApplicationSearchController()) | ||||
->setQueryKey($request->getURIData('queryKey')) | ->setQueryKey($request->getURIData('queryKey')) | ||||
->setSearchEngine($engine) | ->setSearchEngine($engine); | ||||
->setNavigation($this->buildSideNav()); | |||||
return $this->delegateToController($controller); | return $this->delegateToController($controller); | ||||
} | } | ||||
public function buildSideNav() { | protected function buildApplicationCrumbs() { | ||||
$user = $this->getRequest()->getUser(); | $crumbs = parent::buildApplicationCrumbs(); | ||||
$nav = new AphrontSideNavFilterView(); | |||||
$nav->setBaseURI(new PhutilURI($this->getApplicationURI())); | |||||
id(new PhabricatorCalendarEventSearchEngine()) | |||||
->setViewer($user) | |||||
->addNavigationItems($nav->getMenu()); | |||||
$nav->selectFilter(null); | id(new PhabricatorCalendarEditEngine()) | ||||
->setViewer($this->getViewer()) | |||||
->addActionToCrumbs($crumbs); | |||||
return $nav; | return $crumbs; | ||||
} | } | ||||
} | } |