本文整理汇总了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;
}
示例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;
}
示例3: getRepositoryControllerURI
protected function getRepositoryControllerURI(PhabricatorRepository $repository, $path)
{
return $repository->getPathURI($path);
}
示例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;
}
示例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;
}
示例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;
}