Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F144260
HeraldCustomAction.php
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
hach-que
Apr 16 2014, 6:10 AM
2014-04-16 06:10:59 (UTC+0)
Size
824 B
Referenced Files
None
Subscribers
None
HeraldCustomAction.php
View Options
<?php
abstract
class
HeraldCustomAction
{
public
abstract
function
appliesToAdapter
(
HeraldAdapter
$adapter
);
public
abstract
function
getAvailableActions
(
HeraldAdapter
$adapter
);
public
abstract
function
applyAction
(
$object
,
$action
);
}
final
class
RiskReviewHeraldCustomAction
extends
HeraldCustomAction
{
public
function
appliesToAdapter
(
HeraldAdapter
$adapter
)
{
return
$adapter
instanceof
HeraldDifferentialRevisionAdapter
;
}
public
function
getAvailableActions
(
HeraldAdapter
$adapter
)
{
return
array
(
'add-risk'
=>
array
(
'name'
=>
'Add risk rating'
,
'type'
=>
'text'
));
}
public
function
applyAction
(
$object
,
$action
)
{
switch
(
$action
)
{
case
'add-risk'
:
// TODO: Do something with the DifferentialRevision $object.
break
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/oh/uw/2fltnokfjvdpbxea
Default Alt Text
HeraldCustomAction.php (824 B)
Attached To
Mode
P1116 HeraldCustomAction.php
Attached
Detach File
Event Timeline
Log In to Comment