本文整理匯總了PHP中PhabricatorApplication::getHelpURI方法的典型用法代碼示例。如果您正苦於以下問題:PHP PhabricatorApplication::getHelpURI方法的具體用法?PHP PhabricatorApplication::getHelpURI怎麽用?PHP PhabricatorApplication::getHelpURI使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PhabricatorApplication
的用法示例。
在下文中一共展示了PhabricatorApplication::getHelpURI方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: buildActionView
private function buildActionView(PhabricatorUser $user, PhabricatorApplication $selected)
{
$view = id(new PhabricatorActionListView())->setUser($user)->setObjectURI($this->getRequest()->getRequestURI());
if ($selected->getHelpURI()) {
$view->addAction(id(new PhabricatorActionView())->setName(pht('Help / Documentation'))->setIcon('fa-life-ring')->setHref($selected->getHelpURI()));
}
$can_edit = PhabricatorPolicyFilter::hasCapability($user, $selected, PhabricatorPolicyCapability::CAN_EDIT);
$edit_uri = $this->getApplicationURI('edit/' . get_class($selected) . '/');
$view->addAction(id(new PhabricatorActionView())->setName(pht('Edit Policies'))->setIcon('fa-pencil')->setDisabled(!$can_edit)->setWorkflow(!$can_edit)->setHref($edit_uri));
if ($selected->canUninstall()) {
if ($selected->isInstalled()) {
$view->addAction(id(new PhabricatorActionView())->setName(pht('Uninstall'))->setIcon('fa-times')->setDisabled(!$can_edit)->setWorkflow(true)->setHref($this->getApplicationURI(get_class($selected) . '/uninstall/')));
} else {
$action = id(new PhabricatorActionView())->setName(pht('Install'))->setIcon('fa-plus')->setDisabled(!$can_edit)->setWorkflow(true)->setHref($this->getApplicationURI(get_class($selected) . '/install/'));
$beta_enabled = PhabricatorEnv::getEnvConfig('phabricator.show-beta-applications');
if ($selected->isBeta() && !$beta_enabled) {
$action->setDisabled(true);
}
$view->addAction($action);
}
} else {
$view->addAction(id(new PhabricatorActionView())->setName(pht('Uninstall'))->setIcon('fa-times')->setWorkflow(true)->setDisabled(true)->setHref($this->getApplicationURI(get_class($selected) . '/uninstall/')));
}
return $view;
}