本文整理汇总了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;
}