Path: blob/master/src/applications/maniphest/engineextension/ManiphestMailEngineExtension.php
12256 views
<?php12final class ManiphestMailEngineExtension3extends PhabricatorMailEngineExtension {45const EXTENSIONKEY = 'maniphest';67public function supportsObject($object) {8return ($object instanceof ManiphestTask);9}1011public function newMailStampTemplates($object) {12return array(13id(new PhabricatorPHIDMailStamp())14->setKey('author')15->setLabel(pht('Author')),16id(new PhabricatorPHIDMailStamp())17->setKey('task-owner')18->setLabel(pht('Task Owner')),19id(new PhabricatorBoolMailStamp())20->setKey('task-unassigned')21->setLabel(pht('Task Unassigned')),22id(new PhabricatorStringMailStamp())23->setKey('task-priority')24->setLabel(pht('Task Priority')),25id(new PhabricatorStringMailStamp())26->setKey('task-status')27->setLabel(pht('Task Status')),28id(new PhabricatorStringMailStamp())29->setKey('subtype')30->setLabel(pht('Subtype')),31);32}3334public function newMailStamps($object, array $xactions) {35$editor = $this->getEditor();36$viewer = $this->getViewer();3738$this->getMailStamp('author')39->setValue($object->getAuthorPHID());4041$this->getMailStamp('task-owner')42->setValue($object->getOwnerPHID());4344$this->getMailStamp('task-unassigned')45->setValue(!$object->getOwnerPHID());4647$this->getMailStamp('task-priority')48->setValue($object->getPriority());4950$this->getMailStamp('task-status')51->setValue($object->getStatus());5253$this->getMailStamp('subtype')54->setValue($object->getSubtype());55}5657}585960