Page MenuHomePhabricator

D13472.id32599.diff
No OneTemporary

D13472.id32599.diff

diff --git a/src/view/form/control/AphrontFormPolicyControl.php b/src/view/form/control/AphrontFormPolicyControl.php
--- a/src/view/form/control/AphrontFormPolicyControl.php
+++ b/src/view/form/control/AphrontFormPolicyControl.php
@@ -39,6 +39,22 @@
return $this;
}
+ public function getSerializedValue() {
+ return json_encode(array(
+ $this->getValue(),
+ $this->getSpacePHID(),
+ ));
+ }
+
+ public function readSerializedValue($value) {
+ $decoded = phutil_json_decode($value);
+ $policy_value = $decoded[0];
+ $space_phid = $decoded[1];
+ $this->setValue($policy_value);
+ $this->setSpacePHID($space_phid);
+ return $this;
+ }
+
public function readValueFromDictionary(array $dictionary) {
// TODO: This is a little hacky but will only get us into trouble if we
// have multiple view policy controls in multiple paged form views on the

File Metadata

Mime Type
text/plain
Expires
Fri, May 17, 11:42 PM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6290523
Default Alt Text
D13472.id32599.diff (903 B)

Event Timeline