本文整理汇总了PHP中PhabricatorRepository::canAllowDangerousChanges方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorRepository::canAllowDangerousChanges方法的具体用法?PHP PhabricatorRepository::canAllowDangerousChanges怎么用?PHP PhabricatorRepository::canAllowDangerousChanges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorRepository
的用法示例。
在下文中一共展示了PhabricatorRepository::canAllowDangerousChanges方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildHostingProperties
private function buildHostingProperties(PhabricatorRepository $repository, PhabricatorActionListView $actions)
{
$user = $this->getRequest()->getUser();
$view = id(new PHUIPropertyListView())->setUser($user)->setActionList($actions);
$hosting = $repository->isHosted() ? pht('Hosted on Phabricator') : pht('Hosted Elsewhere');
$view->addProperty(pht('Hosting'), phutil_tag('em', array(), $hosting));
$view->addProperty(pht('Serve over HTTP'), phutil_tag('em', array(), PhabricatorRepository::getProtocolAvailabilityName($repository->getServeOverHTTP())));
$view->addProperty(pht('Serve over SSH'), phutil_tag('em', array(), PhabricatorRepository::getProtocolAvailabilityName($repository->getServeOverSSH())));
if ($repository->canAllowDangerousChanges()) {
if ($repository->shouldAllowDangerousChanges()) {
$description = pht('Allowed');
} else {
$description = pht('Not Allowed');
}
$view->addProperty(pht('Dangerous Changes'), $description);
}
return $view;
}