Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97580727
PhabricatorSpacesMailEngineExtension.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
Sun, Jan 5, 10:51
Size
796 B
Mime Type
text/x-php
Expires
Tue, Jan 7, 10:51 (2 d)
Engine
blob
Format
Raw Data
Handle
23430593
Attached To
rPH Phabricator
PhabricatorSpacesMailEngineExtension.php
View Options
<?php
final
class
PhabricatorSpacesMailEngineExtension
extends
PhabricatorMailEngineExtension
{
const
EXTENSIONKEY
=
'spaces'
;
public
function
supportsObject
(
$object
)
{
return
(
$object
instanceof
PhabricatorSpacesInterface
);
}
public
function
newMailStampTemplates
(
$object
)
{
return
array
(
id
(
new
PhabricatorPHIDMailStamp
())
->
setKey
(
'space'
)
->
setLabel
(
pht
(
'Space'
)),
);
}
public
function
newMailStamps
(
$object
,
array
$xactions
)
{
$editor
=
$this
->
getEditor
();
$viewer
=
$this
->
getViewer
();
if
(!
PhabricatorSpacesNamespaceQuery
::
getSpacesExist
())
{
return
;
}
$space_phid
=
PhabricatorSpacesNamespaceQuery
::
getObjectSpacePHID
(
$object
);
$this
->
getMailStamp
(
'space'
)
->
setValue
(
$space_phid
);
}
}
Event Timeline
Log In to Comment