mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 19:32:40 +01:00
c2ac63e9ad
Summary: Ref T6822. This method needs to be `public` because it is called from `PhabricatorApplicationSearchController::buildApplicationMenu()`. Test Plan: I wouldn't expect //increasing// method visibility to break anything. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6822 Differential Revision: https://secure.phabricator.com/D11416
40 lines
962 B
PHP
40 lines
962 B
PHP
<?php
|
|
|
|
abstract class PassphraseController extends PhabricatorController {
|
|
|
|
public function buildSideNavView($for_app = false) {
|
|
$user = $this->getRequest()->getUser();
|
|
|
|
$nav = new AphrontSideNavFilterView();
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
|
|
|
if ($for_app) {
|
|
$nav->addFilter('create', pht('Create Credential'));
|
|
}
|
|
|
|
id(new PassphraseCredentialSearchEngine())
|
|
->setViewer($user)
|
|
->addNavigationItems($nav->getMenu());
|
|
|
|
$nav->selectFilter(null);
|
|
|
|
return $nav;
|
|
}
|
|
|
|
public function buildApplicationMenu() {
|
|
return $this->buildSideNavView(true)->getMenu();
|
|
}
|
|
|
|
protected function buildApplicationCrumbs() {
|
|
$crumbs = parent::buildApplicationCrumbs();
|
|
|
|
$crumbs->addAction(
|
|
id(new PHUIListItemView())
|
|
->setName(pht('Create Credential'))
|
|
->setHref($this->getApplicationURI('create/'))
|
|
->setIcon('fa-plus-square'));
|
|
|
|
return $crumbs;
|
|
}
|
|
|
|
}
|