Options as Array

This commit is contained in:
Thomas Peterson 2016-02-10 11:31:19 +01:00
parent 947c93bf1b
commit fca348347c

View File

@ -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;
}
}