/** * Sets the options of the attribute * * @param string $class * @param AbstractAttribute $attribute * @param array $optionsData */ protected function setOptions($class, AbstractAttribute $attribute, array $optionsData) { $this->doctrineCache->setReference($attribute); $optionClass = $this->attributeManager->getAttributeOptionClass(); foreach ($optionsData as $code => $optionData) { $optionData['attribute'] = $attribute->getCode(); if (!isset($optionData['code'])) { $optionData['code'] = $code; } $option = $this->transformNestedEntity($class, 'options', $optionClass, $optionData); $attribute->addOption($option); $this->doctrineCache->setReference($option); } }
/** * Get the attribute option FQCN. * * @return string */ public function getAttributeOptionClass() { return $this->baseAttributeManager->getAttributeOptionClass(); }