Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/storage/PhabricatorProjectTransaction.php
Show All 12 Lines | final class PhabricatorProjectTransaction | ||||
const TYPE_PARENT = 'project:parent'; | const TYPE_PARENT = 'project:parent'; | ||||
const TYPE_MILESTONE = 'project:milestone'; | const TYPE_MILESTONE = 'project:milestone'; | ||||
// NOTE: This is deprecated, members are just a normal edge now. | // NOTE: This is deprecated, members are just a normal edge now. | ||||
const TYPE_MEMBERS = 'project:members'; | const TYPE_MEMBERS = 'project:members'; | ||||
const MAILTAG_METADATA = 'project-metadata'; | const MAILTAG_METADATA = 'project-metadata'; | ||||
const MAILTAG_MEMBERS = 'project-members'; | const MAILTAG_MEMBERS = 'project-members'; | ||||
const MAILTAG_SUBSCRIBERS = 'project-subscribers'; | |||||
const MAILTAG_WATCHERS = 'project-watchers'; | const MAILTAG_WATCHERS = 'project-watchers'; | ||||
const MAILTAG_OTHER = 'project-other'; | const MAILTAG_OTHER = 'project-other'; | ||||
public function getApplicationName() { | public function getApplicationName() { | ||||
return 'project'; | return 'project'; | ||||
} | } | ||||
public function getApplicationTransactionType() { | public function getApplicationTransactionType() { | ||||
▲ Show 20 Lines • Show All 347 Lines • ▼ Show 20 Lines | public function getMailTags() { | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case self::TYPE_NAME: | case self::TYPE_NAME: | ||||
case self::TYPE_SLUGS: | case self::TYPE_SLUGS: | ||||
case self::TYPE_IMAGE: | case self::TYPE_IMAGE: | ||||
case self::TYPE_ICON: | case self::TYPE_ICON: | ||||
case self::TYPE_COLOR: | case self::TYPE_COLOR: | ||||
$tags[] = self::MAILTAG_METADATA; | $tags[] = self::MAILTAG_METADATA; | ||||
break; | break; | ||||
case PhabricatorTransactions::TYPE_SUBSCRIBERS: | |||||
$tags[] = self::MAILTAG_SUBSCRIBERS; | |||||
break; | |||||
case PhabricatorTransactions::TYPE_EDGE: | case PhabricatorTransactions::TYPE_EDGE: | ||||
$type = $this->getMetadata('edge:type'); | $type = $this->getMetadata('edge:type'); | ||||
$type = head($type); | $type = head($type); | ||||
$type_member = PhabricatorProjectProjectHasMemberEdgeType::EDGECONST; | $type_member = PhabricatorProjectProjectHasMemberEdgeType::EDGECONST; | ||||
$type_watcher = PhabricatorObjectHasWatcherEdgeType::EDGECONST; | $type_watcher = PhabricatorObjectHasWatcherEdgeType::EDGECONST; | ||||
if ($type == $type_member) { | if ($type == $type_member) { | ||||
$tags[] = self::MAILTAG_MEMBERS; | $tags[] = self::MAILTAG_MEMBERS; | ||||
} else if ($type == $type_watcher) { | } else if ($type == $type_watcher) { | ||||
Show All 19 Lines |