Page MenuHomePhorge

PhabricatorTransactions.php
No OneTemporary

PhabricatorTransactions.php

<?php
final class PhabricatorTransactions extends Phobject {
const TYPE_COMMENT = 'core:comment';
const TYPE_SUBSCRIBERS = 'core:subscribers';
const TYPE_VIEW_POLICY = 'core:view-policy';
const TYPE_EDIT_POLICY = 'core:edit-policy';
const TYPE_JOIN_POLICY = 'core:join-policy';
const TYPE_INTERACT_POLICY = 'core:interact-policy';
const TYPE_EDGE = 'core:edge';
const TYPE_CUSTOMFIELD = 'core:customfield';
const TYPE_TOKEN = 'token:give';
const TYPE_INLINESTATE = 'core:inlinestate';
const TYPE_SPACE = 'core:space';
const TYPE_CREATE = 'core:create';
const TYPE_COLUMNS = 'core:columns';
const TYPE_SUBTYPE = 'core:subtype';
const TYPE_HISTORY = 'core:history';
const TYPE_MFA = 'core:mfa';
const TYPE_FILE = 'core:file';
const COLOR_RED = 'red';
const COLOR_ORANGE = 'orange';
const COLOR_YELLOW = 'yellow';
const COLOR_GREEN = 'green';
const COLOR_SKY = 'sky';
const COLOR_BLUE = 'blue';
const COLOR_INDIGO = 'indigo';
const COLOR_VIOLET = 'violet';
const COLOR_GREY = 'grey';
const COLOR_BLACK = 'black';
public static function getInlineStateMap() {
return array(
PhabricatorInlineComment::STATE_DRAFT =>
PhabricatorInlineComment::STATE_DONE,
PhabricatorInlineComment::STATE_UNDRAFT =>
PhabricatorInlineComment::STATE_UNDONE,
);
}
/**
* Find the first transaction that matches a type.
* @param array $xactions
* @param string $type
* @return PhabricatorTransactions|null
*/
public static function findOneByType($xactions, $type) {
foreach ($xactions as $xaction) {
if ($xaction->getTransactionType() === $type) {
return $xaction;
}
}
return null;
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Jan 19, 16:17 (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1120003
Default Alt Text
PhabricatorTransactions.php (1 KB)

Event Timeline