本文整理汇总了PHP中PhabricatorApplication::isPrototype方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorApplication::isPrototype方法的具体用法?PHP PhabricatorApplication::isPrototype怎么用?PHP PhabricatorApplication::isPrototype使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorApplication
的用法示例。
在下文中一共展示了PhabricatorApplication::isPrototype方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildPropertyView
private function buildPropertyView(PhabricatorApplication $application, PhabricatorActionListView $actions)
{
$viewer = $this->getRequest()->getUser();
$properties = id(new PHUIPropertyListView());
$properties->setActionList($actions);
$properties->addProperty(pht('Description'), $application->getShortDescription());
if ($application->getFlavorText()) {
$properties->addProperty(null, phutil_tag('em', array(), $application->getFlavorText()));
}
if ($application->isPrototype()) {
$proto_href = PhabricatorEnv::getDoclink('User Guide: Prototype Applications');
$learn_more = phutil_tag('a', array('href' => $proto_href, 'target' => '_blank'), pht('Learn More'));
$properties->addProperty(pht('Prototype'), pht('This application is a prototype. %s', $learn_more));
}
$overview = $application->getOverview();
if (strlen($overview)) {
$overview = new PHUIRemarkupView($viewer, $overview);
$properties->addSectionHeader(pht('Overview'), PHUIPropertyListView::ICON_SUMMARY);
$properties->addTextContent($overview);
}
$descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions($viewer, $application);
$properties->addSectionHeader(pht('Policies'), 'fa-lock');
foreach ($application->getCapabilities() as $capability) {
$properties->addProperty($application->getCapabilityLabel($capability), idx($descriptions, $capability));
}
return $properties;
}
示例2: buildPropertySectionView
private function buildPropertySectionView(PhabricatorApplication $application)
{
$viewer = $this->getViewer();
$properties = id(new PHUIPropertyListView());
$properties->addProperty(pht('Description'), $application->getShortDescription());
if ($application->getFlavorText()) {
$properties->addProperty(null, phutil_tag('em', array(), $application->getFlavorText()));
}
if ($application->isPrototype()) {
$proto_href = PhabricatorEnv::getDoclink('User Guide: Prototype Applications');
$learn_more = phutil_tag('a', array('href' => $proto_href, 'target' => '_blank'), pht('Learn More'));
$properties->addProperty(pht('Prototype'), pht('This application is a prototype. %s', $learn_more));
}
$overview = $application->getOverview();
if (strlen($overview)) {
$overview = new PHUIRemarkupView($viewer, $overview);
$properties->addSectionHeader(pht('Overview'), PHUIPropertyListView::ICON_SUMMARY);
$properties->addTextContent($overview);
}
return $properties;
}