當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。