Differential D14607 Diff 35339 src/applications/transactions/editfield/PhabricatorPHIDListEditField.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editfield/PhabricatorPHIDListEditField.php
| Show All 22 Lines | public function setEdgeTransactionDescriptions($add, $rem, $set) { | ||||
| ); | ); | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| protected function newHTTPParameterType() { | protected function newHTTPParameterType() { | ||||
| return new AphrontPHIDListHTTPParameterType(); | return new AphrontPHIDListHTTPParameterType(); | ||||
| } | } | ||||
| protected function getValueForTransaction() { | public function getValueForTransaction() { | ||||
| $new = parent::getValueForTransaction(); | $new = parent::getValueForTransaction(); | ||||
| if (!$this->getUseEdgeTransactions()) { | if (!$this->getUseEdgeTransactions()) { | ||||
| return $new; | return $new; | ||||
| } | } | ||||
| $old = $this->getInitialValue(); | $old = $this->getInitialValue(); | ||||
| if ($old === null) { | if ($old === null) { | ||||
| Show All 26 Lines | abstract class PhabricatorPHIDListEditField | ||||
| protected function newEditType() { | protected function newEditType() { | ||||
| if ($this->getUseEdgeTransactions()) { | if ($this->getUseEdgeTransactions()) { | ||||
| return new PhabricatorEdgeEditType(); | return new PhabricatorEdgeEditType(); | ||||
| } | } | ||||
| return parent::newEditType(); | return parent::newEditType(); | ||||
| } | } | ||||
| public function getEditTransactionTypes() { | public function getConduitEditTypes() { | ||||
| if (!$this->getUseEdgeTransactions()) { | if (!$this->getUseEdgeTransactions()) { | ||||
| return parent::getEditTransactionTypes(); | return parent::getConduitEditTypes(); | ||||
| } | } | ||||
| $transaction_type = $this->getTransactionType(); | $transaction_type = $this->getTransactionType(); | ||||
| if ($transaction_type === null) { | if ($transaction_type === null) { | ||||
| return array(); | return array(); | ||||
| } | } | ||||
| $type_key = $this->getEditTypeKey(); | $type_key = $this->getEditTypeKey(); | ||||
| $strings = $this->transactionDescriptions; | $strings = $this->transactionDescriptions; | ||||
| $base = $this->getEditTransactionType(); | $base = $this->getEditType(); | ||||
| $add = id(clone $base) | $add = id(clone $base) | ||||
| ->setEditType($type_key.'.add') | ->setEditType($type_key.'.add') | ||||
| ->setEdgeOperation('+') | ->setEdgeOperation('+') | ||||
| ->setDescription(idx($strings, '+')) | ->setDescription(idx($strings, '+')) | ||||
| ->setValueDescription(pht('List of PHIDs to add.')); | ->setValueDescription(pht('List of PHIDs to add.')); | ||||
| $rem = id(clone $base) | $rem = id(clone $base) | ||||
| Show All 19 Lines | |||||