Differential D14402 Diff 34804 src/applications/transactions/editfield/PhabricatorTokenizerEditField.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editfield/PhabricatorTokenizerEditField.php
| Show All 12 Lines | protected function newControl() { | ||||
| if ($this->originalValue !== null) { | if ($this->originalValue !== null) { | ||||
| $control->setOriginalValue($this->originalValue); | $control->setOriginalValue($this->originalValue); | ||||
| } | } | ||||
| return $control; | return $control; | ||||
| } | } | ||||
| public function setOriginalValue(array $value) { | |||||
| $this->originalValue = $value; | |||||
| return $this; | |||||
| } | |||||
| public function setValue($value) { | public function setValue($value) { | ||||
| $this->originalValue = $value; | $this->originalValue = $value; | ||||
| return parent::setValue($value); | return parent::setValue($value); | ||||
| } | } | ||||
| protected function getValueFromSubmit(AphrontRequest $request, $key) { | protected function getValueFromSubmit(AphrontRequest $request, $key) { | ||||
| // TODO: Maybe move this unusual read somewhere else so subclassing this | // TODO: Maybe move this unusual read somewhere else so subclassing this | ||||
| // correctly is easier? | // correctly is easier? | ||||
| $this->originalValue = $request->getArr($key.'.original'); | $this->originalValue = $request->getArr($key.'.original'); | ||||
| return $this->getListFromRequest($request, $key); | return parent::getValueFromSubmit($request, $key); | ||||
| } | |||||
| protected function getDefaultValue() { | |||||
| return array(); | |||||
| } | } | ||||
| protected function getValueForTransaction() { | protected function getValueForTransaction() { | ||||
| $new = parent::getValueForTransaction(); | $new = parent::getValueForTransaction(); | ||||
| $edge_types = array( | $edge_types = array( | ||||
| PhabricatorTransactions::TYPE_EDGE => true, | PhabricatorTransactions::TYPE_EDGE => true, | ||||
| PhabricatorTransactions::TYPE_SUBSCRIBERS => true, | PhabricatorTransactions::TYPE_SUBSCRIBERS => true, | ||||
| Show All 33 Lines | if (isset($edge_types[$this->getTransactionType()])) { | ||||
| '=' => array_fuse($new), | '=' => array_fuse($new), | ||||
| ); | ); | ||||
| } | } | ||||
| } | } | ||||
| return $new; | return $new; | ||||
| } | } | ||||
| public function getHTTPParameterType() { | protected function newHTTPParameterType() { | ||||
| return 'list<phid>'; | return new AphrontPHIDListHTTPParameterType(); | ||||
| } | } | ||||
| } | } | ||||