Differential D17593 Diff 42320 src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php
| Show First 20 Lines • Show All 339 Lines • ▼ Show 20 Lines | public function validateApplicationTransactions( | ||||
| $this->setFieldError(null); | $this->setFieldError(null); | ||||
| $errors = parent::validateApplicationTransactions( | $errors = parent::validateApplicationTransactions( | ||||
| $editor, | $editor, | ||||
| $type, | $type, | ||||
| $xactions); | $xactions); | ||||
| $object = $this->getObject(); | |||||
| if ($object instanceof PhabricatorEditEngineSubtypeInterface) { | |||||
| $subtype = $object->getEditEngineSubtype(); | |||||
| if ($subtype) { | |||||
| $subtypes = $this->getFieldConfigValue('subtypes'); | |||||
| if ($subtypes && !in_array($subtype, $subtypes)) { | |||||
| return $errors; | |||||
| } | |||||
| } | |||||
| } | |||||
| if ($this->getRequired()) { | if ($this->getRequired()) { | ||||
| $value = $this->getOldValueForApplicationTransactions(); | $value = $this->getOldValueForApplicationTransactions(); | ||||
| $transaction = null; | $transaction = null; | ||||
| foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
| $value = $xaction->getNewValue(); | $value = $xaction->getNewValue(); | ||||
| if (!$this->isValueEmpty($value)) { | if (!$this->isValueEmpty($value)) { | ||||
| $transaction = $xaction; | $transaction = $xaction; | ||||
| ▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines | |||||