<?php

/**
 * @group conduit
 */
abstract class PhabricatorConduitController extends PhabricatorController {

  protected function buildSideNavView() {
    $viewer = $this->getRequest()->getUser();

    $nav = new AphrontSideNavFilterView();
    $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));

    id(new PhabricatorConduitSearchEngine())
      ->setViewer($viewer)
      ->addNavigationItems($nav->getMenu());

    $nav->addLabel('Logs');
    $nav->addFilter('log', pht('Call Logs'));

    $nav->selectFilter(null);

    return $nav;
  }

  protected function buildApplicationMenu() {
    return $this->buildSideNavView()->getMenu();
  }


}
