Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F113098592
PhabricatorSubscriptionsAddSelfHeraldAction.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, May 15, 00:13
Size
962 B
Mime Type
text/x-php
Expires
Sat, May 17, 00:13 (2 d)
Engine
blob
Format
Raw Data
Handle
26099537
Attached To
rPH Phabricator
PhabricatorSubscriptionsAddSelfHeraldAction.php
View Options
<?php
final
class
PhabricatorSubscriptionsAddSelfHeraldAction
extends
PhabricatorSubscriptionsHeraldAction
{
const
ACTIONCONST
=
'subscribers.self.add'
;
public
function
getHeraldActionName
()
{
return
pht
(
'Add me as a subscriber'
);
}
public
function
getActionGroupKey
()
{
return
HeraldSupportActionGroup
::
ACTIONGROUPKEY
;
}
public
function
supportsObject
(
$object
)
{
return
(
$object
instanceof
PhabricatorSubscribableInterface
);
}
public
function
supportsRuleType
(
$rule_type
)
{
return
(
$rule_type
==
HeraldRuleTypeConfig
::
RULE_TYPE_PERSONAL
);
}
public
function
applyEffect
(
$object
,
HeraldEffect
$effect
)
{
$phid
=
$effect
->
getRule
()->
getAuthorPHID
();
return
$this
->
applySubscribe
(
array
(
$phid
),
$is_add
=
true
);
}
public
function
getHeraldActionStandardType
()
{
return
self
::
STANDARD_NONE
;
}
public
function
renderActionDescription
(
$value
)
{
return
pht
(
'Add rule author as subscriber.'
);
}
}
Event Timeline
Log In to Comment