Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93152047
PhrictionActionConstants.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
Tue, Nov 26, 14:49
Size
678 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 14:49 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
22582787
Attached To
rPH Phabricator
PhrictionActionConstants.php
View Options
<?php
/**
* @group phriction
*/
final
class
PhrictionActionConstants
extends
PhrictionConstants
{
const
ACTION_CREATE
=
'create'
;
const
ACTION_EDIT
=
'edit'
;
const
ACTION_DELETE
=
'delete'
;
const
ACTION_MOVE_AWAY
=
'move to'
;
const
ACTION_MOVE_HERE
=
'move here'
;
public
static
function
getActionPastTenseVerb
(
$action
)
{
static
$map
=
array
(
self
::
ACTION_CREATE
=>
'created'
,
self
::
ACTION_EDIT
=>
'edited'
,
self
::
ACTION_DELETE
=>
'deleted'
,
self
::
ACTION_MOVE_AWAY
=>
'moved a document to'
,
self
::
ACTION_MOVE_HERE
=>
'moved a document from'
,
);
return
idx
(
$map
,
$action
,
"brazenly {$action}'d"
);
}
}
Event Timeline
Log In to Comment