From fca348347cbceb1818241dece6830e1b6d07a5d4 Mon Sep 17 00:00:00 2001 From: Thomas Peterson Date: Wed, 10 Feb 2016 11:31:19 +0100 Subject: [PATCH] Options as Array --- src/Article.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Article.php b/src/Article.php index 4b3c48d..f455844 100644 --- a/src/Article.php +++ b/src/Article.php @@ -78,4 +78,17 @@ class Article return $this->options; } + public function getOptionsAsArray() + { + $temp = array(); + /** @var Option\Type\Base $option */ + foreach ($this->options as $option) { + $temp[$option->getId()] = array( + 'name' => $option->getName(), + 'value' => $option->getValue(), + 'rawVaue' => $option->getRawValue() + ); + } + return $temp; + } } \ No newline at end of file