当前位置: 首页>>代码示例>>PHP>>正文


PHP Issue::getBuilds方法代码示例

本文整理汇总了PHP中thebuggenie\core\entities\Issue::getBuilds方法的典型用法代码示例。如果您正苦于以下问题:PHP Issue::getBuilds方法的具体用法?PHP Issue::getBuilds怎么用?PHP Issue::getBuilds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在thebuggenie\core\entities\Issue的用法示例。


在下文中一共展示了Issue::getBuilds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: resultGrouping

 static function resultGrouping(entities\Issue $issue, $groupby, $cc, $prevgroup_id)
 {
     $i18n = framework\Context::getI18n();
     $showtablestart = false;
     $showheader = false;
     $groupby_id = 0;
     $groupby_description = '';
     if ($cc == 1) {
         $showtablestart = true;
     }
     if ($groupby != '') {
         switch ($groupby) {
             case 'category':
                 if ($issue->getCategory() instanceof entities\Category) {
                     $groupby_id = $issue->getCategory()->getID();
                     $groupby_description = $issue->getCategory()->getName();
                 } else {
                     $groupby_id = 0;
                     $groupby_description = $i18n->__('Unknown');
                 }
                 break;
             case 'status':
                 if ($issue->getStatus() instanceof entities\Status) {
                     $groupby_id = $issue->getStatus()->getID();
                     $groupby_description = $issue->getStatus()->getName();
                 } else {
                     $groupby_id = 0;
                     $groupby_description = $i18n->__('Unknown');
                 }
                 break;
             case 'severity':
                 if ($issue->getSeverity() instanceof entities\Severity) {
                     $groupby_id = $issue->getSeverity()->getID();
                     $groupby_description = $issue->getSeverity()->getName();
                 } else {
                     $groupby_id = 0;
                     $groupby_description = $i18n->__('Unknown');
                 }
                 break;
             case 'resolution':
                 if ($issue->getResolution() instanceof entities\Resolution) {
                     $groupby_id = $issue->getResolution()->getID();
                     $groupby_description = $issue->getResolution()->getName();
                 } else {
                     $groupby_id = 0;
                     $groupby_description = $i18n->__('Unknown');
                 }
                 break;
             case 'edition':
                 if ($issue->getEditions()) {
                     $groupby_id = $issue->getFirstAffectedEdition()->getID();
                     $groupby_description = $issue->getFirstAffectedEdition()->getName();
                 } else {
                     $groupby_id = 0;
                     $groupby_description = $i18n->__('None');
                 }
                 break;
             case 'build':
                 if ($issue->getBuilds()) {
                     $groupby_id = $issue->getFirstAffectedBuild()->getID();
                     $groupby_description = $issue->getFirstAffectedBuild()->getName();
                 } else {
                     $groupby_id = 0;
                     $groupby_description = $i18n->__('None');
                 }
                 break;
             case 'component':
                 if ($issue->getComponents()) {
                     $groupby_id = $issue->getFirstAffectedComponent()->getID();
                     $groupby_description = $issue->getFirstAffectedComponent()->getName();
                 } else {
                     $groupby_id = 0;
                     $groupby_description = $i18n->__('None');
                 }
                 break;
             case 'priority':
                 if ($issue->getPriority() instanceof entities\Priority) {
                     $groupby_id = $issue->getPriority()->getID();
                     $groupby_description = $issue->getPriority()->getName();
                 } else {
                     $groupby_id = 0;
                     $groupby_description = $i18n->__('Unknown');
                 }
                 break;
             case 'issuetype':
                 if ($issue->getIssueType() instanceof entities\Issuetype) {
                     $groupby_id = $issue->getIssueType()->getID();
                     $groupby_description = $issue->getIssueType()->getName();
                 } else {
                     $groupby_id = 0;
                     $groupby_description = $i18n->__('Unknown');
                 }
                 break;
             case 'milestone':
                 if ($issue->getMilestone() instanceof entities\Milestone) {
                     $groupby_id = $issue->getMilestone()->getID();
                     $groupby_description = $issue->getMilestone()->getName();
                 } else {
                     $groupby_id = 0;
                     $groupby_description = $i18n->__('Not targetted');
//.........这里部分代码省略.........
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:101,代码来源:Actions.php


注:本文中的thebuggenie\core\entities\Issue::getBuilds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。