Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2894849
DifferentialBlockHeraldAction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
DifferentialBlockHeraldAction.php
View Options
<?php
final
class
DifferentialBlockHeraldAction
extends
HeraldAction
{
const
ACTIONCONST
=
'differential.block'
;
const
DO_BLOCK
=
'do.block'
;
public
function
getHeraldActionName
(
)
{
return
pht
(
'Block diff with message'
)
;
}
public
function
getActionGroupKey
(
)
{
return
HeraldApplicationActionGroup
::
ACTIONGROUPKEY
;
}
public
function
supportsObject
(
$object
)
{
return
(
$object
instanceof
DifferentialDiff
)
;
}
public
function
supportsRuleType
(
$rule_type
)
{
return
(
$rule_type
!=
HeraldRuleTypeConfig
::
RULE_TYPE_PERSONAL
)
;
}
public
function
applyEffect
(
$object
,
HeraldEffect
$effect
)
{
// This rule intentionally has no direct effect: the caller handles it
// after executing Herald.
$this
->
logEffect
(
self
::
DO_BLOCK
)
;
}
public
function
getHeraldActionStandardType
(
)
{
return
self
::
STANDARD_TEXT
;
}
public
function
renderActionDescription
(
$value
)
{
return
pht
(
'Block diff with message: %s'
,
$value
)
;
}
protected
function
getActionEffectMap
(
)
{
return
array
(
self
::
DO_BLOCK
=>
array
(
'icon'
=>
'fa-stop'
,
'color'
=>
'red'
,
'name'
=>
pht
(
'Blocked Diff'
)
,
)
,
)
;
}
protected
function
renderActionEffectDescription
(
$type
,
$data
)
{
switch
(
$type
)
{
case
self
::
DO_BLOCK
:
return
pht
(
'Blocked diff.'
)
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 20:35 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1128485
Default Alt Text
DifferentialBlockHeraldAction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment