Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93451772
PhabricatorAuditActionConstants.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Nov 28, 21:10
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Nov 30, 21:10 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22641703
Attached To
rPH Phabricator
PhabricatorAuditActionConstants.php
View Options
<?php
final
class
PhabricatorAuditActionConstants
{
const
CONCERN
=
'concern'
;
const
ACCEPT
=
'accept'
;
const
COMMENT
=
'comment'
;
const
RESIGN
=
'resign'
;
const
CLOSE
=
'close'
;
const
ADD_CCS
=
'add_ccs'
;
const
ADD_AUDITORS
=
'add_auditors'
;
const
INLINE
=
'audit:inline'
;
const
ACTION
=
'audit:action'
;
public
static
function
getActionNameMap
()
{
$map
=
array
(
self
::
COMMENT
=>
pht
(
'Comment'
),
self
::
CONCERN
=>
pht
(
"Raise Concern
\x
E2
\x
9C
\x
98"
),
self
::
ACCEPT
=>
pht
(
"Accept Commit
\x
E2
\x
9C
\x
94"
),
self
::
RESIGN
=>
pht
(
'Resign from Audit'
),
self
::
CLOSE
=>
pht
(
'Close Audit'
),
self
::
ADD_CCS
=>
pht
(
'Add CCs'
),
self
::
ADD_AUDITORS
=>
pht
(
'Add Auditors'
),
);
return
$map
;
}
public
static
function
getActionName
(
$constant
)
{
$map
=
self
::
getActionNameMap
();
return
idx
(
$map
,
$constant
,
pht
(
'Unknown'
));
}
public
static
function
getActionPastTenseVerb
(
$action
)
{
$map
=
array
(
self
::
COMMENT
=>
pht
(
'commented on'
),
self
::
CONCERN
=>
pht
(
'raised a concern with'
),
self
::
ACCEPT
=>
pht
(
'accepted'
),
self
::
RESIGN
=>
pht
(
'resigned from'
),
self
::
CLOSE
=>
pht
(
'closed'
),
self
::
ADD_CCS
=>
pht
(
'added CCs to'
),
self
::
ADD_AUDITORS
=>
pht
(
'added auditors to'
),
);
return
idx
(
$map
,
$action
,
pht
(
'updated'
));
}
}
Event Timeline
Log In to Comment