本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}