當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PhabricatorApplication::getShortDescription方法代碼示例

本文整理匯總了PHP中PhabricatorApplication::getShortDescription方法的典型用法代碼示例。如果您正苦於以下問題:PHP PhabricatorApplication::getShortDescription方法的具體用法?PHP PhabricatorApplication::getShortDescription怎麽用?PHP PhabricatorApplication::getShortDescription使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PhabricatorApplication的用法示例。


在下文中一共展示了PhabricatorApplication::getShortDescription方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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;
 }
開發者ID:Houzz,項目名稱:phabricator,代碼行數:27,代碼來源:PhabricatorApplicationDetailViewController.php

示例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;
 }
開發者ID:rchicoli,項目名稱:phabricator,代碼行數:21,代碼來源:PhabricatorApplicationDetailViewController.php

示例3: 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->isBeta()) {
         $properties->addProperty(pht('Release'), pht('Beta'));
     }
     $overview = $application->getOverview();
     if ($overview) {
         $properties->addSectionHeader(pht('Overview'), PHUIPropertyListView::ICON_SUMMARY);
         $properties->addTextContent(PhabricatorMarkupEngine::renderOneObject(id(new PhabricatorMarkupOneOff())->setContent($overview), 'default', $viewer));
     }
     $descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions($viewer, $application);
     $properties->addSectionHeader(pht('Policies'));
     foreach ($application->getCapabilities() as $capability) {
         $properties->addProperty($application->getCapabilityLabel($capability), idx($descriptions, $capability));
     }
     return $properties;
 }
開發者ID:denghp,項目名稱:phabricator,代碼行數:24,代碼來源:PhabricatorApplicationDetailViewController.php


注:本文中的PhabricatorApplication::getShortDescription方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。