mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 01:32:42 +01:00
7d475eb09a
Summary: Ref T13053. Adds task stamps plus the major infrastructure applications. Test Plan: {F5413058} Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13053 Differential Revision: https://secure.phabricator.com/D18996
35 lines
796 B
PHP
35 lines
796 B
PHP
<?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);
|
|
}
|
|
|
|
}
|