本文整理汇总了PHP中AphrontSideNavFilterView::getMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP AphrontSideNavFilterView::getMenu方法的具体用法?PHP AphrontSideNavFilterView::getMenu怎么用?PHP AphrontSideNavFilterView::getMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AphrontSideNavFilterView
的用法示例。
在下文中一共展示了AphrontSideNavFilterView::getMenu方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildSideNavView
public function buildSideNavView($for_app = false)
{
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
$name = null;
if ($for_app) {
$name = $this->getRequest()->getURIData('username');
if ($name) {
$nav->setBaseURI(new PhutilURI('/p/'));
$nav->addFilter("{$name}/", $name);
$nav->addFilter("{$name}/calendar/", pht('Calendar'));
}
}
if (!$name) {
$viewer = $this->getRequest()->getUser();
id(new PhabricatorPeopleSearchEngine())->setViewer($viewer)->addNavigationItems($nav->getMenu());
if ($viewer->getIsAdmin()) {
$nav->addLabel(pht('User Administration'));
if (PhabricatorLDAPAuthProvider::getLDAPProvider()) {
$nav->addFilter('ldap', pht('Import from LDAP'));
}
$nav->addFilter('logs', pht('Activity Logs'));
$nav->addFilter('invite', pht('Email Invitations'));
}
}
return $nav;
}
示例2: buildSideNavView
/**
* @param PhutilURI $uri
*/
public function buildSideNavView($viewer, $uri, $for_app = false)
{
$request = $this->getRequest();
$id = $request->getURIData('id');
$slug = $request->getURIData('slug');
if ($slug) {
$id = $this->getProjectIDfromSlug($slug, $viewer);
}
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI($uri);
if ($for_app) {
if ($id) {
$nav->addFilter("profile/{$id}/", pht('Profile'));
$nav->addFilter("board/{$id}/", pht('Workboard'));
$nav->addFilter("members/{$id}/", pht('Members'));
$nav->addFilter("feed/{$id}/", pht('Feed'));
$nav->addFilter("details/{$id}/", pht('Edit Details'));
}
$nav->addFilter('create', pht('Create Project'));
}
id(new PhabricatorProjectSearchEngine())->setViewer($viewer)->addNavigationItems($nav->getMenu());
if ($viewer->isLoggedIn()) {
$nav->addLabel(pht('Sprints'));
$nav->addFilter('report/list', pht('Sprint List'));
}
$nav->selectFilter(null);
return $nav;
}
示例3: buildSideNavView
public function buildSideNavView($for_app = false)
{
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
$viewer = $this->getRequest()->getUser();
id(new PhabricatorPeopleLogSearchEngine())->setViewer($viewer)->addNavigationItems($nav->getMenu());
return $nav;
}
示例4: buildSideNavView
public function buildSideNavView()
{
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
id(new DrydockLogSearchEngine())->setViewer($this->getRequest()->getUser())->addNavigationItems($nav->getMenu());
$nav->selectFilter(null);
return $nav;
}
示例5: buildSideNavView
protected function buildSideNavView()
{
$user = $this->getRequest()->getUser();
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
id(new PhabricatorFeedSearchEngine())->setViewer($user)->addNavigationItems($nav->getMenu());
$nav->selectFilter(null);
return $nav;
}
示例6: buildSideNavView
public function buildSideNavView()
{
$viewer = $this->getViewer();
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
id(new PhortuneChargeSearchEngine())->setViewer($viewer)->addNavigationItems($nav->getMenu());
$nav->selectFilter(null);
return $nav;
}
示例7: buildSideNavView
public function buildSideNavView()
{
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
$engine = id(new DrydockRepositoryOperationSearchEngine())->setViewer($this->getViewer());
$engine->addNavigationItems($nav->getMenu());
$nav->selectFilter(null);
return $nav;
}
示例8: buildSideNavView
public function buildSideNavView($for_app = false)
{
$user = $this->getRequest()->getUser();
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
$this->getSearchEngine()->addNavigationItems($nav->getMenu());
$nav->selectFilter(null);
return $nav;
}
示例9: buildSideNavView
public function buildSideNavView()
{
$viewer = $this->getViewer();
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
id(new HeraldRuleSearchEngine())->setViewer($viewer)->addNavigationItems($nav->getMenu());
$nav->addLabel(pht('Utilities'))->addFilter('test', pht('Test Console'))->addFilter('transcript', pht('Transcripts'));
$nav->selectFilter(null);
return $nav;
}
示例10: buildSideNavView
public function buildSideNavView()
{
$user = $this->getRequest()->getUser();
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
id(new PhabricatorDashboardSearchEngine())->setViewer($user)->addNavigationItems($nav->getMenu());
$nav->addLabel(pht('Panels'));
$nav->addFilter('panel/', pht('Manage Panels'));
$nav->selectFilter(null);
return $nav;
}
示例11: buildSideNavView
public function buildSideNavView()
{
$user = $this->getRequest()->getUser();
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
id(new FundInitiativeSearchEngine())->setViewer($user)->addNavigationItems($nav->getMenu());
$nav->addLabel(pht('Backers'));
$nav->addFilter('backers/', pht('Find Backers'));
$nav->selectFilter(null);
return $nav;
}
示例12: buildSideNavView
public function buildSideNavView($for_app = false)
{
$user = $this->getRequest()->getUser();
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
id(new HarbormasterBuildableSearchEngine())->setViewer($user)->addNavigationItems($nav->getMenu());
$nav->addLabel(pht('Build Plans'));
$nav->addFilter('plan/', pht('Manage Build Plans'));
$nav->selectFilter(null);
return $nav;
}
示例13: buildSideNavView
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;
}
示例14: buildSideNavView
protected function buildSideNavView($for_app = false)
{
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
if ($for_app) {
$nav->addLabel(pht('Create'));
$nav->addFilter('', pht('Create Macro'), $this->getApplicationURI('/create/'));
}
id(new PhabricatorMacroSearchEngine())->setViewer($this->getRequest()->getUser())->addNavigationItems($nav->getMenu());
return $nav;
}
示例15: buildSideNavView
public function buildSideNavView()
{
$viewer = $this->getRequest()->getUser();
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
id(new PhamePostSearchEngine())->setViewer($viewer)->addNavigationItems($nav->getMenu());
$nav->addLabel(pht('Blogs'));
$nav->addFilter('blog/', pht('Manage Blogs'));
$nav->selectFilter(null);
return $nav;
}