Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F509749
ManiphestMailEngineExtension.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ManiphestMailEngineExtension.php
View Options
<?php
final
class
ManiphestMailEngineExtension
extends
PhabricatorMailEngineExtension
{
const
EXTENSIONKEY
=
'maniphest'
;
public
function
supportsObject
(
$object
)
{
return
(
$object
instanceof
ManiphestTask
);
}
public
function
newMailStampTemplates
(
$object
)
{
return
array
(
id
(
new
PhabricatorPHIDMailStamp
())
->
setKey
(
'author'
)
->
setLabel
(
pht
(
'Author'
)),
id
(
new
PhabricatorPHIDMailStamp
())
->
setKey
(
'task-owner'
)
->
setLabel
(
pht
(
'Task Owner'
)),
id
(
new
PhabricatorBoolMailStamp
())
->
setKey
(
'task-unassigned'
)
->
setLabel
(
pht
(
'Task Unassigned'
)),
id
(
new
PhabricatorStringMailStamp
())
->
setKey
(
'task-priority'
)
->
setLabel
(
pht
(
'Task Priority'
)),
id
(
new
PhabricatorStringMailStamp
())
->
setKey
(
'task-status'
)
->
setLabel
(
pht
(
'Task Status'
)),
id
(
new
PhabricatorStringMailStamp
())
->
setKey
(
'subtype'
)
->
setLabel
(
pht
(
'Subtype'
)),
);
}
public
function
newMailStamps
(
$object
,
array
$xactions
)
{
$editor
=
$this
->
getEditor
();
$viewer
=
$this
->
getViewer
();
$this
->
getMailStamp
(
'author'
)
->
setValue
(
$object
->
getAuthorPHID
());
$this
->
getMailStamp
(
'task-owner'
)
->
setValue
(
$object
->
getOwnerPHID
());
$this
->
getMailStamp
(
'task-unassigned'
)
->
setValue
(!
$object
->
getOwnerPHID
());
$this
->
getMailStamp
(
'task-priority'
)
->
setValue
(
$object
->
getPriority
());
$this
->
getMailStamp
(
'task-status'
)
->
setValue
(
$object
->
getStatus
());
$this
->
getMailStamp
(
'subtype'
)
->
setValue
(
$object
->
getSubtype
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 11, 9:40 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
104473
Default Alt Text
ManiphestMailEngineExtension.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment