Differential D8286 Diff 19727 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 194 Lines • ▼ Show 20 Lines | /* -( PhabricatorCustomField )--------------------------------------------- */ | ||||
public function readValueFromRequest(AphrontRequest $request) { | public function readValueFromRequest(AphrontRequest $request) { | ||||
$value = $request->getStr($this->getFieldKey()); | $value = $request->getStr($this->getFieldKey()); | ||||
if (!strlen($value)) { | if (!strlen($value)) { | ||||
$value = null; | $value = null; | ||||
} | } | ||||
$this->setFieldValue($value); | $this->setFieldValue($value); | ||||
} | } | ||||
public function renderEditControl() { | public function renderEditControl(array $handles) { | ||||
return id(new AphrontFormTextControl()) | return id(new AphrontFormTextControl()) | ||||
->setName($this->getFieldKey()) | ->setName($this->getFieldKey()) | ||||
->setCaption($this->getCaption()) | ->setCaption($this->getCaption()) | ||||
->setValue($this->getFieldValue()) | ->setValue($this->getFieldValue()) | ||||
->setError($this->getFieldError()) | ->setError($this->getFieldError()) | ||||
->setLabel($this->getFieldName()); | ->setLabel($this->getFieldName()); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines |