本文整理汇总了PHP中PhabricatorApplicationTransaction::getActionName方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorApplicationTransaction::getActionName方法的具体用法?PHP PhabricatorApplicationTransaction::getActionName怎么用?PHP PhabricatorApplicationTransaction::getActionName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorApplicationTransaction
的用法示例。
在下文中一共展示了PhabricatorApplicationTransaction::getActionName方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getActionName
public function getActionName()
{
switch ($this->getTransactionType()) {
case self::TYPE_DIFF_CREATE:
return pht('Created');
}
return parent::getActionName();
}
示例2: getActionName
public function getActionName()
{
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_DISABLE:
if ($new) {
return pht('Disabled');
} else {
return pht('Enabled');
}
}
return parent::getActionName();
}
示例3: getActionName
public function getActionName()
{
switch ($this->getTransactionType()) {
case self::TYPE_CREATED:
return pht('Created');
case self::TYPE_HOLD:
return pht('Hold');
case self::TYPE_REVIEW:
return pht('Review');
case self::TYPE_CANCEL:
return pht('Cancelled');
case self::TYPE_REFUND:
return pht('Refunded');
case self::TYPE_PURCHASED:
return pht('Complete');
case self::TYPE_INVOICED:
return pht('New Invoice');
}
return parent::getActionName();
}
示例4: getActionName
public function getActionName()
{
switch ($this->getTransactionType()) {
case PhabricatorAuditActionConstants::ACTION:
switch ($this->getNewValue()) {
case PhabricatorAuditActionConstants::CONCERN:
return pht('Raised Concern');
case PhabricatorAuditActionConstants::ACCEPT:
return pht('Accepted');
case PhabricatorAuditActionConstants::RESIGN:
return pht('Resigned');
case PhabricatorAuditActionConstants::CLOSE:
return pht('Closed');
}
break;
case PhabricatorAuditActionConstants::ADD_AUDITORS:
return pht('Added Auditors');
}
return parent::getActionName();
}
示例5: getActionName
public function getActionName()
{
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_TITLE:
if ($old === null) {
return pht('Asked');
}
break;
case self::TYPE_ANSWERS:
return pht('Answered');
}
return parent::getActionName();
}
示例6: getActionName
public function getActionName()
{
switch ($this->getTransactionType()) {
case self::TYPE_REQUEST:
return pht('Requested');
case self::TYPE_COMMIT:
$action_type = $this->getMetadataValue('action');
switch ($action_type) {
case 'pick':
return pht('Picked');
case 'revert':
return pht('Reverted');
}
}
return parent::getActionName();
}
示例7: getActionName
public function getActionName()
{
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_TITLE:
if ($old === null) {
return pht('Created');
}
return pht('Retitled');
case self::TYPE_STATUS:
$action = ManiphestTaskStatus::getStatusActionName($new);
if ($action) {
return $action;
}
$old_closed = ManiphestTaskStatus::isClosedStatus($old);
$new_closed = ManiphestTaskStatus::isClosedStatus($new);
if ($new_closed && !$old_closed) {
return pht('Closed');
} else {
if (!$new_closed && $old_closed) {
return pht('Reopened');
} else {
return pht('Changed Status');
}
}
case self::TYPE_DESCRIPTION:
return pht('Edited');
case self::TYPE_OWNER:
if ($this->getAuthorPHID() == $new) {
return pht('Claimed');
} else {
if (!$new) {
return pht('Up For Grabs');
} else {
if (!$old) {
return pht('Assigned');
} else {
return pht('Reassigned');
}
}
}
case self::TYPE_CCS:
return pht('Changed CC');
case self::TYPE_PROJECTS:
return pht('Changed Projects');
case self::TYPE_PROJECT_COLUMN:
return pht('Changed Project Column');
case self::TYPE_PRIORITY:
if ($old == ManiphestTaskPriority::getDefaultPriority()) {
return pht('Triaged');
} else {
if ($old > $new) {
return pht('Lowered Priority');
} else {
return pht('Raised Priority');
}
}
case self::TYPE_EDGE:
case self::TYPE_ATTACH:
return pht('Attached');
case self::TYPE_UNBLOCK:
$old_status = head($old);
$new_status = head($new);
$old_closed = ManiphestTaskStatus::isClosedStatus($old_status);
$new_closed = ManiphestTaskStatus::isClosedStatus($new_status);
if ($old_closed && !$new_closed) {
return pht('Block');
} else {
if (!$old_closed && $new_closed) {
return pht('Unblock');
} else {
return pht('Blocker');
}
}
case self::TYPE_MERGED_INTO:
case self::TYPE_MERGED_FROM:
return pht('Merged');
}
return parent::getActionName();
}
示例8: getActionName
public function getActionName()
{
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_TITLE:
if ($old === null) {
if ($this->getMetadataValue('stub:create:phid')) {
return pht('Stubbed');
} else {
return pht('Created');
}
}
return pht('Retitled');
case self::TYPE_CONTENT:
return pht('Edited');
case self::TYPE_DELETE:
return pht('Deleted');
case self::TYPE_MOVE_TO:
return pht('Moved');
case self::TYPE_MOVE_AWAY:
return pht('Moved Away');
}
return parent::getActionName();
}
示例9: getActionName
public function getActionName()
{
switch ($this->getTransactionType()) {
case self::TYPE_INLINE:
return pht('Commented On');
case self::TYPE_UPDATE:
$old = $this->getOldValue();
if ($old === null) {
return pht('Request');
} else {
return pht('Updated');
}
case self::TYPE_ACTION:
$map = array(DifferentialAction::ACTION_ACCEPT => pht('Accepted'), DifferentialAction::ACTION_REJECT => pht('Requested Changes To'), DifferentialAction::ACTION_RETHINK => pht('Planned Changes To'), DifferentialAction::ACTION_ABANDON => pht('Abandoned'), DifferentialAction::ACTION_CLOSE => pht('Closed'), DifferentialAction::ACTION_REQUEST => pht('Requested A Review Of'), DifferentialAction::ACTION_RESIGN => pht('Resigned From'), DifferentialAction::ACTION_ADDREVIEWERS => pht('Added Reviewers'), DifferentialAction::ACTION_CLAIM => pht('Commandeered'), DifferentialAction::ACTION_REOPEN => pht('Reopened'));
$name = idx($map, $this->getNewValue());
if ($name !== null) {
return $name;
}
break;
}
return parent::getActionName();
}
示例10: getActionName
public function getActionName()
{
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case PhabricatorMacroTransactionType::TYPE_NAME:
if ($old === null) {
return pht('Created');
} else {
return pht('Renamed');
}
case PhabricatorMacroTransactionType::TYPE_DISABLED:
if ($new) {
return pht('Disabled');
} else {
return pht('Restored');
}
case PhabricatorMacroTransactionType::TYPE_FILE:
if ($old === null) {
return pht('Created');
} else {
return pht('Edited Image');
}
case PhabricatorMacroTransactionType::TYPE_AUDIO:
return pht('Audio');
case PhabricatorMacroTransactionType::TYPE_AUDIO_BEHAVIOR:
return pht('Audio Behavior');
}
return parent::getActionName();
}