Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/herald/HeraldManiphestTaskAdapter.php
- This file was moved from src/applications/herald/adapter/HeraldManiphestTaskAdapter.php.
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | final class HeraldManiphestTaskAdapter extends HeraldAdapter { | ||||
public function getFields() { | public function getFields() { | ||||
return array_merge( | return array_merge( | ||||
array( | array( | ||||
self::FIELD_TITLE, | self::FIELD_TITLE, | ||||
self::FIELD_BODY, | self::FIELD_BODY, | ||||
self::FIELD_AUTHOR, | self::FIELD_AUTHOR, | ||||
self::FIELD_ASSIGNEE, | self::FIELD_ASSIGNEE, | ||||
self::FIELD_TASK_PRIORITY, | |||||
self::FIELD_TASK_STATUS, | |||||
), | ), | ||||
parent::getFields()); | parent::getFields()); | ||||
} | } | ||||
public function getActions($rule_type) { | public function getActions($rule_type) { | ||||
switch ($rule_type) { | switch ($rule_type) { | ||||
case HeraldRuleTypeConfig::RULE_TYPE_GLOBAL: | case HeraldRuleTypeConfig::RULE_TYPE_GLOBAL: | ||||
return array_merge( | return array_merge( | ||||
Show All 32 Lines | switch ($field) { | ||||
case self::FIELD_TITLE: | case self::FIELD_TITLE: | ||||
return $this->getTask()->getTitle(); | return $this->getTask()->getTitle(); | ||||
case self::FIELD_BODY: | case self::FIELD_BODY: | ||||
return $this->getTask()->getDescription(); | return $this->getTask()->getDescription(); | ||||
case self::FIELD_AUTHOR: | case self::FIELD_AUTHOR: | ||||
return $this->getTask()->getAuthorPHID(); | return $this->getTask()->getAuthorPHID(); | ||||
case self::FIELD_ASSIGNEE: | case self::FIELD_ASSIGNEE: | ||||
return $this->getTask()->getOwnerPHID(); | return $this->getTask()->getOwnerPHID(); | ||||
case self::FIELD_TASK_PRIORITY: | |||||
return $this->getTask()->getPriority(); | |||||
case self::FIELD_TASK_STATUS: | |||||
return $this->getTask()->getStatus(); | |||||
} | } | ||||
return parent::getHeraldField($field); | return parent::getHeraldField($field); | ||||
} | } | ||||
public function applyHeraldEffects(array $effects) { | public function applyHeraldEffects(array $effects) { | ||||
assert_instances_of($effects, 'HeraldEffect'); | assert_instances_of($effects, 'HeraldEffect'); | ||||
Show All 22 Lines |