2011-01-24 18:00:29 +01:00
|
|
|
<?php
|
|
|
|
|
2011-07-04 21:03:36 +02:00
|
|
|
/**
|
|
|
|
* @group conduit
|
|
|
|
*/
|
2011-01-24 18:00:29 +01:00
|
|
|
abstract class PhabricatorConduitController extends PhabricatorController {
|
|
|
|
|
2013-07-01 21:36:34 +02:00
|
|
|
protected function buildSideNavView() {
|
|
|
|
$viewer = $this->getRequest()->getUser();
|
2012-01-26 21:47:23 +01:00
|
|
|
|
2013-07-01 21:36:34 +02:00
|
|
|
$nav = new AphrontSideNavFilterView();
|
|
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
2011-01-24 18:00:29 +01:00
|
|
|
|
2013-07-01 21:36:34 +02:00
|
|
|
id(new PhabricatorConduitSearchEngine())
|
|
|
|
->setViewer($viewer)
|
|
|
|
->addNavigationItems($nav->getMenu());
|
2012-01-26 21:47:23 +01:00
|
|
|
|
2013-07-01 21:36:34 +02:00
|
|
|
$nav->addLabel('Logs');
|
|
|
|
$nav->addFilter('log', pht('Call Logs'));
|
2012-01-26 21:47:23 +01:00
|
|
|
|
2013-07-01 21:36:34 +02:00
|
|
|
$nav->selectFilter(null);
|
2012-04-18 23:25:27 +02:00
|
|
|
|
2013-07-01 21:36:34 +02:00
|
|
|
return $nav;
|
2012-01-26 21:47:23 +01:00
|
|
|
}
|
|
|
|
|
2013-07-01 21:36:34 +02:00
|
|
|
protected function buildApplicationMenu() {
|
|
|
|
return $this->buildSideNavView()->getMenu();
|
2012-01-26 21:47:23 +01:00
|
|
|
}
|
|
|
|
|
2012-04-18 23:25:27 +02:00
|
|
|
|
2011-01-24 18:00:29 +01:00
|
|
|
}
|