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


PHP PhabricatorApplicationTransaction::getColor方法代码示例

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


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

示例1: getColor

 public function getColor()
 {
     switch ($this->getTransactionType()) {
         case self::TYPE_DIFF_CREATE:
             return PhabricatorTransactions::COLOR_SKY;
     }
     return parent::getColor();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:8,代码来源:DifferentialDiffTransaction.php

示例2: getColor

 public function getColor()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_NAME:
             return PhabricatorTransactions::COLOR_BLUE;
     }
     return parent::getColor();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:10,代码来源:PhabricatorFileTransaction.php

示例3: getColor

 public function getColor()
 {
     $author_phid = $this->getAuthorPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_CREATE:
             return 'green';
     }
     return parent::getColor();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:11,代码来源:HarbormasterBuildStepTransaction.php

示例4: getColor

 public function getColor()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_NAME:
             if (!strlen($old)) {
                 return PhabricatorTransactions::COLOR_GREEN;
             }
             break;
     }
     return parent::getColor();
 }
开发者ID:denghp,项目名称:phabricator,代码行数:13,代码来源:PhabricatorDashboardPanelTransaction.php

示例5: getColor

 public function getColor()
 {
     $type = $this->getTransactionType();
     switch ($type) {
         case PhabricatorAuditActionConstants::ACTION:
             switch ($this->getNewValue()) {
                 case PhabricatorAuditActionConstants::CONCERN:
                     return 'red';
                 case PhabricatorAuditActionConstants::ACCEPT:
                     return 'green';
             }
     }
     return parent::getColor();
 }
开发者ID:denghp,项目名称:phabricator,代码行数:14,代码来源:PhabricatorAuditTransaction.php

示例6: getColor

 public function getColor()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_ENABLE:
             if ($new) {
                 return 'green';
             } else {
                 return 'indigo';
             }
     }
     return parent::getColor();
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:14,代码来源:PhabricatorAuthProviderConfigTransaction.php

示例7: getColor

 public function getColor()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_STATUS:
             if ($old == 0) {
                 return 'red';
             } else {
                 return 'green';
             }
     }
     return parent::getColor();
 }
开发者ID:patelhardik,项目名称:phabricator,代码行数:14,代码来源:PhabricatorProjectTransaction.php

示例8: getColor

 public function getColor()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_ACTIVE:
             if ($new) {
                 return 'green';
             } else {
                 return 'black';
             }
             break;
     }
     return parent::getColor();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:15,代码来源:ReleephProductTransaction.php

示例9: getColor

 public function getColor()
 {
     $author_phid = $this->getAuthorPHID();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_CREATE:
             return 'green';
         case self::TYPE_COMMAND:
             switch ($new) {
                 case HarbormasterBuildCommand::COMMAND_STOP:
                     return 'red';
             }
     }
     return parent::getColor();
 }
开发者ID:fengshao0907,项目名称:phabricator,代码行数:16,代码来源:HarbormasterBuildableTransaction.php

示例10: getColor

 public function getColor()
 {
     $old = $this->getOldValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_TITLE:
             if ($old === null) {
                 return PhabricatorTransactions::COLOR_GREEN;
             }
             break;
     }
     return parent::getColor();
 }
开发者ID:miaokuan,项目名称:phabricator,代码行数:12,代码来源:PhamePostTransaction.php

示例11: getColor

 public function getColor()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_STATUS:
             if ($new == PholioMock::STATUS_CLOSED) {
                 return PhabricatorTransactions::COLOR_INDIGO;
             } else {
                 return PhabricatorTransactions::COLOR_GREEN;
             }
         case self::TYPE_NAME:
             if ($old === null) {
                 return PhabricatorTransactions::COLOR_GREEN;
             }
         case self::TYPE_IMAGE_REPLACE:
             return PhabricatorTransactions::COLOR_YELLOW;
         case self::TYPE_IMAGE_FILE:
             $add = array_diff($new, $old);
             $rem = array_diff($old, $new);
             if ($add && $rem) {
                 return PhabricatorTransactions::COLOR_YELLOW;
             } else {
                 if ($add) {
                     return PhabricatorTransactions::COLOR_GREEN;
                 } else {
                     return PhabricatorTransactions::COLOR_RED;
                 }
             }
     }
     return parent::getColor();
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:32,代码来源:PholioTransaction.php

示例12: getColor

 public function getColor()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case PholioTransactionType::TYPE_NAME:
             if ($old === null) {
                 return PhabricatorTransactions::COLOR_GREEN;
             }
         case PholioTransactionType::TYPE_DESCRIPTION:
         case PholioTransactionType::TYPE_STATUS:
         case PholioTransactionType::TYPE_IMAGE_NAME:
         case PholioTransactionType::TYPE_IMAGE_DESCRIPTION:
         case PholioTransactionType::TYPE_IMAGE_SEQUENCE:
             return PhabricatorTransactions::COLOR_BLUE;
         case PholioTransactionType::TYPE_IMAGE_REPLACE:
             return PhabricatorTransactions::COLOR_YELLOW;
         case PholioTransactionType::TYPE_IMAGE_FILE:
             $add = array_diff($new, $old);
             $rem = array_diff($old, $new);
             if ($add && $rem) {
                 return PhabricatorTransactions::COLOR_YELLOW;
             } else {
                 if ($add) {
                     return PhabricatorTransactions::COLOR_GREEN;
                 } else {
                     return PhabricatorTransactions::COLOR_RED;
                 }
             }
     }
     return parent::getColor();
 }
开发者ID:denghp,项目名称:phabricator,代码行数:32,代码来源:PholioTransaction.php

示例13: getColor

 public function getColor()
 {
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_USER_INTENT:
             switch ($new) {
                 case ReleephRequest::INTENT_WANT:
                     return PhabricatorTransactions::COLOR_GREEN;
                 case ReleephRequest::INTENT_PASS:
                     return PhabricatorTransactions::COLOR_RED;
             }
     }
     return parent::getColor();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:14,代码来源:ReleephRequestTransaction.php

示例14: getColor

 public function getColor()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_OWNER:
             if ($this->getAuthorPHID() == $new) {
                 return 'green';
             } else {
                 if (!$new) {
                     return 'black';
                 } else {
                     if (!$old) {
                         return 'green';
                     } else {
                         return 'green';
                     }
                 }
             }
         case self::TYPE_STATUS:
             $color = ManiphestTaskStatus::getStatusColor($new);
             if ($color !== null) {
                 return $color;
             }
             if (ManiphestTaskStatus::isOpenStatus($new)) {
                 return 'green';
             } else {
                 return 'black';
             }
         case self::TYPE_PRIORITY:
             if ($old == ManiphestTaskPriority::getDefaultPriority()) {
                 return 'green';
             } else {
                 if ($old > $new) {
                     return 'grey';
                 } else {
                     return 'yellow';
                 }
             }
     }
     return parent::getColor();
 }
开发者ID:denghp,项目名称:phabricator,代码行数:42,代码来源:ManiphestTransaction.php

示例15: getColor

 public function getColor()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_CONTENT:
             return PhabricatorTransactions::COLOR_GREEN;
         case self::TYPE_STATUS:
             switch ($new) {
                 case PhabricatorPaste::STATUS_ACTIVE:
                     return 'green';
                 case PhabricatorPaste::STATUS_ARCHIVED:
                     return 'indigo';
             }
             break;
     }
     return parent::getColor();
 }
开发者ID:truSense,项目名称:phabricator,代码行数:18,代码来源:PhabricatorPasteTransaction.php


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