Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editfield/PhabricatorEditField.php
| Show All 22 Lines | abstract class PhabricatorEditField extends Phobject { | ||||
| private $isPreview; | private $isPreview; | ||||
| private $isEditDefaults; | private $isEditDefaults; | ||||
| private $isSubmittedForm; | private $isSubmittedForm; | ||||
| private $controlError; | private $controlError; | ||||
| private $isReorderable = true; | private $isReorderable = true; | ||||
| private $isDefaultable = true; | private $isDefaultable = true; | ||||
| private $isLockable = true; | private $isLockable = true; | ||||
| private $isCopyable = false; | |||||
| public function setKey($key) { | public function setKey($key) { | ||||
| $this->key = $key; | $this->key = $key; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getKey() { | public function getKey() { | ||||
| return $this->key; | return $this->key; | ||||
| ▲ Show 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | public function setIsHidden($is_hidden) { | ||||
| $this->isHidden = $is_hidden; | $this->isHidden = $is_hidden; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getIsHidden() { | public function getIsHidden() { | ||||
| return $this->isHidden; | return $this->isHidden; | ||||
| } | } | ||||
| public function setIsCopyable($is_copyable) { | |||||
| $this->isCopyable = $is_copyable; | |||||
| return $this; | |||||
| } | |||||
| public function getIsCopyable() { | |||||
| return $this->isCopyable; | |||||
| } | |||||
| public function setIsSubmittedForm($is_submitted) { | public function setIsSubmittedForm($is_submitted) { | ||||
| $this->isSubmittedForm = $is_submitted; | $this->isSubmittedForm = $is_submitted; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getIsSubmittedForm() { | public function getIsSubmittedForm() { | ||||
| return $this->isSubmittedForm; | return $this->isSubmittedForm; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | abstract class PhabricatorEditField extends Phobject { | ||||
| protected function getValueExistsInRequest(AphrontRequest $request, $key) { | protected function getValueExistsInRequest(AphrontRequest $request, $key) { | ||||
| return $this->getHTTPParameterValueExists($request, $key); | return $this->getHTTPParameterValueExists($request, $key); | ||||
| } | } | ||||
| protected function getValueFromRequest(AphrontRequest $request, $key) { | protected function getValueFromRequest(AphrontRequest $request, $key) { | ||||
| return $this->getHTTPParameterValue($request, $key); | return $this->getHTTPParameterValue($request, $key); | ||||
| } | } | ||||
| public function readValueFromField(PhabricatorEditField $other) { | |||||
| $this->value = $this->getValueFromField($other); | |||||
| return $this; | |||||
| } | |||||
| protected function getValueFromField(PhabricatorEditField $other) { | |||||
| return $other->getValue(); | |||||
| } | |||||
| /** | /** | ||||
| * Read and return the value the object had when the user first loaded the | * Read and return the value the object had when the user first loaded the | ||||
| * form. | * form. | ||||
| * | * | ||||
| * This is the initial value from the user's point of view when they started | * This is the initial value from the user's point of view when they started | ||||
| * the edit process, and used primarily to prevent race conditions for fields | * the edit process, and used primarily to prevent race conditions for fields | ||||
| * like "Projects" and "Subscribers" that use tokenizers and support edge | * like "Projects" and "Subscribers" that use tokenizers and support edge | ||||
| ▲ Show 20 Lines • Show All 144 Lines • Show Last 20 Lines | |||||