From 16dd28e8fc1c0f017bee722008869ffd78bc7f14 Mon Sep 17 00:00:00 2001 From: Joel Alphonso Date: Fri, 3 Feb 2017 15:37:23 -0500 Subject: [PATCH] Output the multipleOptions assossiative array as json --- src/Charcoal/Property/AbstractProperty.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Charcoal/Property/AbstractProperty.php b/src/Charcoal/Property/AbstractProperty.php index defe1e05..339e07a9 100644 --- a/src/Charcoal/Property/AbstractProperty.php +++ b/src/Charcoal/Property/AbstractProperty.php @@ -580,6 +580,16 @@ public function multipleOptions($key = null) return $this->multipleOptions; } + /** + * Output the property multiple options as json. + * + * @return string + */ + public function multipleOptionsAsJson() + { + return json_encode($this->multipleOptions()); + } + /** * Retrieve the default settings for a multi-value property. *