Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99059236
PhabricatorSubscriptionsMailEngineExtension.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
Sat, Jan 18, 19:24
Size
819 B
Mime Type
text/x-php
Expires
Mon, Jan 20, 19:24 (2 d)
Engine
blob
Format
Raw Data
Handle
23691161
Attached To
rPH Phabricator
PhabricatorSubscriptionsMailEngineExtension.php
View Options
<?php
final
class
PhabricatorSubscriptionsMailEngineExtension
extends
PhabricatorMailEngineExtension
{
const
EXTENSIONKEY
=
'subscriptions'
;
public
function
supportsObject
(
$object
)
{
return
(
$object
instanceof
PhabricatorSubscribableInterface
);
}
public
function
newMailStampTemplates
(
$object
)
{
return
array
(
id
(
new
PhabricatorPHIDMailStamp
())
->
setKey
(
'subscriber'
)
->
setLabel
(
pht
(
'Subscriber'
)),
);
}
public
function
newMailStamps
(
$object
,
array
$xactions
)
{
$editor
=
$this
->
getEditor
();
$viewer
=
$this
->
getViewer
();
$subscriber_phids
=
PhabricatorEdgeQuery
::
loadDestinationPHIDs
(
$object
->
getPHID
(),
PhabricatorObjectHasSubscriberEdgeType
::
EDGECONST
);
$this
->
getMailStamp
(
'subscriber'
)
->
setValue
(
$subscriber_phids
);
}
}
Event Timeline
Log In to Comment