Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/customfield/field/PhabricatorCustomField.php
| Show First 20 Lines • Show All 1,085 Lines • ▼ Show 20 Lines | public function getEditEngineFields(PhabricatorEditEngine $engine) { | ||||
| $field = $this->newStandardEditField($engine); | $field = $this->newStandardEditField($engine); | ||||
| return array( | return array( | ||||
| $field, | $field, | ||||
| ); | ); | ||||
| } | } | ||||
| protected function newEditField() { | protected function newEditField() { | ||||
| return id(new PhabricatorCustomFieldEditField()) | $field = id(new PhabricatorCustomFieldEditField()) | ||||
| ->setCustomField($this); | ->setCustomField($this); | ||||
| $http_type = $this->getHTTPParameterType(); | |||||
| if ($http_type) { | |||||
| $field->setCustomFieldHTTPParameterType($http_type); | |||||
| } | |||||
| return $field; | |||||
| } | } | ||||
| protected function newStandardEditField() { | protected function newStandardEditField() { | ||||
| if ($this->proxy) { | if ($this->proxy) { | ||||
| return $this->proxy->newStandardEditField(); | return $this->proxy->newStandardEditField(); | ||||
| } | } | ||||
| return $this->newEditField() | return $this->newEditField() | ||||
| ->setKey($this->getFieldKey()) | ->setKey($this->getFieldKey()) | ||||
| ->setEditTypeKey('custom.'.$this->getFieldKey()) | ->setEditTypeKey('custom.'.$this->getFieldKey()) | ||||
| ->setLabel($this->getFieldName()) | ->setLabel($this->getFieldName()) | ||||
| ->setDescription($this->getFieldDescription()) | ->setDescription($this->getFieldDescription()) | ||||
| ->setTransactionType($this->getApplicationTransactionType()) | ->setTransactionType($this->getApplicationTransactionType()) | ||||
| ->setValue($this->getNewValueForApplicationTransactions()); | ->setValue($this->getNewValueForApplicationTransactions()); | ||||
| } | } | ||||
| protected function getHTTPParameterType() { | |||||
| if ($this->proxy) { | |||||
| return $this->proxy->getHTTPParameterType(); | |||||
| } | |||||
| return null; | |||||
| } | |||||
| /** | /** | ||||
| * @task edit | * @task edit | ||||
| */ | */ | ||||
| public function shouldAppearInEditView() { | public function shouldAppearInEditView() { | ||||
| if ($this->proxy) { | if ($this->proxy) { | ||||
| return $this->proxy->shouldAppearInEditView(); | return $this->proxy->shouldAppearInEditView(); | ||||
| } | } | ||||
| return false; | return false; | ||||
| ▲ Show 20 Lines • Show All 268 Lines • Show Last 20 Lines | |||||