Differential D18784 Diff 45114 src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php
| Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | abstract class PhabricatorStandardCustomFieldTokenizer | ||||
| protected function newConduitSearchParameterType() { | protected function newConduitSearchParameterType() { | ||||
| return new ConduitPHIDListParameterType(); | return new ConduitPHIDListParameterType(); | ||||
| } | } | ||||
| protected function newConduitEditParameterType() { | protected function newConduitEditParameterType() { | ||||
| return new ConduitPHIDListParameterType(); | return new ConduitPHIDListParameterType(); | ||||
| } | } | ||||
| public function shouldAppearInHeraldActions() { | |||||
| return true; | |||||
| } | |||||
| public function getHeraldActionName() { | |||||
| return pht('Set "%s" to', $this->getFieldName()); | |||||
| } | |||||
| public function getHeraldActionDescription($value) { | |||||
| $list = $this->renderHeraldHandleList($value); | |||||
| return pht('Set "%s" to: %s.', $this->getFieldName(), $list); | |||||
| } | |||||
| public function getHeraldActionEffectDescription($value) { | |||||
| return $this->renderHeraldHandleList($value); | |||||
| } | |||||
| public function getHeraldActionStandardType() { | |||||
| return HeraldAction::STANDARD_PHID_LIST; | |||||
| } | |||||
| public function getHeraldActionDatasource() { | |||||
| return $this->getDatasource(); | |||||
| } | |||||
| private function renderHeraldHandleList($value) { | |||||
| if (!is_array($value)) { | |||||
| return pht('(Invalid List)'); | |||||
| } else { | |||||
| return $this->getViewer() | |||||
| ->renderHandleList($value) | |||||
| ->setAsInline(true) | |||||
| ->render(); | |||||
| } | |||||
| } | |||||
| } | } | ||||