当前位置: 首页>>代码示例>>PHP>>正文


PHP PhabricatorRepository::getPathURI方法代码示例

本文整理汇总了PHP中PhabricatorRepository::getPathURI方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorRepository::getPathURI方法的具体用法?PHP PhabricatorRepository::getPathURI怎么用?PHP PhabricatorRepository::getPathURI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PhabricatorRepository的用法示例。


在下文中一共展示了PhabricatorRepository::getPathURI方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: renderSideNav

 private function renderSideNav(PhabricatorRepository $repository, array $panels, $selected)
 {
     $base_uri = $repository->getPathURI('manage/');
     $base_uri = new PhutilURI($base_uri);
     $nav = id(new AphrontSideNavFilterView())->setBaseURI($base_uri);
     foreach ($panels as $panel) {
         $key = $panel->getManagementPanelKey();
         $label = $panel->getManagementPanelLabel();
         $icon = $panel->getManagementPanelIcon();
         $href = $panel->getPanelNavigationURI();
         $item = id(new PHUIListItemView())->setKey($key)->setName($label)->setType(PHUIListItemView::TYPE_LINK)->setHref($href)->setIcon($icon);
         $nav->addMenuItem($item);
     }
     $nav->selectFilter($selected);
     return $nav;
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:16,代码来源:DiffusionRepositoryManagePanelsController.php

示例2: buildCurtain

 private function buildCurtain(PhabricatorRepository $repository)
 {
     $viewer = $this->getViewer();
     $edit_uri = $repository->getPathURI('manage/');
     $curtain = $this->newCurtainView($repository);
     $curtain->addAction(id(new PhabricatorActionView())->setName(pht('Manage Repository'))->setIcon('fa-cogs')->setHref($edit_uri));
     if ($repository->isHosted()) {
         $push_uri = $this->getApplicationURI('pushlog/?repositories=' . $repository->getMonogram());
         $curtain->addAction(id(new PhabricatorActionView())->setName(pht('View Push Logs'))->setIcon('fa-list-alt')->setHref($push_uri));
     }
     return $curtain;
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:12,代码来源:DiffusionRepositoryController.php

示例3: getRepositoryControllerURI

 protected function getRepositoryControllerURI(PhabricatorRepository $repository, $path)
 {
     return $repository->getPathURI($path);
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:4,代码来源:DiffusionController.php

示例4: buildActionList

 private function buildActionList(PhabricatorRepository $repository)
 {
     $viewer = $this->getRequest()->getUser();
     $edit_uri = $repository->getPathURI('edit/');
     $view = id(new PhabricatorActionListView())->setUser($viewer)->setObject($repository);
     $can_edit = PhabricatorPolicyFilter::hasCapability($viewer, $repository, PhabricatorPolicyCapability::CAN_EDIT);
     $view->addAction(id(new PhabricatorActionView())->setName(pht('Edit Repository'))->setIcon('fa-pencil')->setHref($edit_uri)->setWorkflow(!$can_edit)->setDisabled(!$can_edit));
     if ($repository->isHosted()) {
         $push_uri = $this->getApplicationURI('pushlog/?repositories=' . $repository->getMonogram());
         $view->addAction(id(new PhabricatorActionView())->setName(pht('View Push Logs'))->setIcon('fa-list-alt')->setHref($push_uri));
     }
     return $view;
 }
开发者ID:truSense,项目名称:phabricator,代码行数:13,代码来源:DiffusionRepositoryController.php

示例5: renderHeadsupActionList

 private function renderHeadsupActionList(PhabricatorRepositoryCommit $commit, PhabricatorRepository $repository)
 {
     $request = $this->getRequest();
     $user = $request->getUser();
     $actions = id(new PhabricatorActionListView())->setUser($user)->setObject($commit);
     $can_edit = PhabricatorPolicyFilter::hasCapability($user, $commit, PhabricatorPolicyCapability::CAN_EDIT);
     $identifier = $commit->getCommitIdentifier();
     $uri = $repository->getPathURI("commit/{$identifier}/edit/");
     $action = id(new PhabricatorActionView())->setName(pht('Edit Commit'))->setHref($uri)->setIcon('fa-pencil')->setDisabled(!$can_edit)->setWorkflow(!$can_edit);
     $actions->addAction($action);
     require_celerity_resource('phabricator-object-selector-css');
     require_celerity_resource('javelin-behavior-phabricator-object-selector');
     $maniphest = 'PhabricatorManiphestApplication';
     if (PhabricatorApplication::isClassInstalled($maniphest)) {
         $action = id(new PhabricatorActionView())->setName(pht('Edit Maniphest Tasks'))->setIcon('fa-anchor')->setHref('/search/attach/' . $commit->getPHID() . '/TASK/edge/')->setWorkflow(true)->setDisabled(!$can_edit);
         $actions->addAction($action);
     }
     $action = id(new PhabricatorActionView())->setName(pht('Download Raw Diff'))->setHref($request->getRequestURI()->alter('diff', true))->setIcon('fa-download');
     $actions->addAction($action);
     return $actions;
 }
开发者ID:rochmit10,项目名称:phabricator,代码行数:21,代码来源:DiffusionCommitController.php

示例6: buildCurtain

 private function buildCurtain(PhabricatorRepositoryCommit $commit, PhabricatorRepository $repository)
 {
     $request = $this->getRequest();
     $viewer = $this->getViewer();
     $curtain = $this->newCurtainView($commit);
     $can_edit = PhabricatorPolicyFilter::hasCapability($viewer, $commit, PhabricatorPolicyCapability::CAN_EDIT);
     $identifier = $commit->getCommitIdentifier();
     $uri = $repository->getPathURI("commit/{$identifier}/edit/");
     $action = id(new PhabricatorActionView())->setName(pht('Edit Commit'))->setHref($uri)->setIcon('fa-pencil')->setDisabled(!$can_edit)->setWorkflow(!$can_edit);
     $curtain->addAction($action);
     $action = id(new PhabricatorActionView())->setName(pht('Download Raw Diff'))->setHref($request->getRequestURI()->alter('diff', true))->setIcon('fa-download');
     $curtain->addAction($action);
     $relationship_list = PhabricatorObjectRelationshipList::newForObject($viewer, $commit);
     $relationship_submenu = $relationship_list->newActionMenu();
     if ($relationship_submenu) {
         $curtain->addAction($relationship_submenu);
     }
     return $curtain;
 }
开发者ID:endlessm,项目名称:phabricator,代码行数:19,代码来源:DiffusionCommitController.php


注:本文中的PhabricatorRepository::getPathURI方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。