23 private $scopeResolver;
28 private $attributeResource;
33 private $optionSelectBuilder;
45 $this->attributeResource = $attributeResource;
46 $this->scopeResolver = $scopeResolver;
47 $this->optionSelectBuilder = $optionSelectBuilder;
55 $scope = $this->scopeResolver->getScope();
56 $select = $this->optionSelectBuilder->getSelect($superAttribute,
$productId, $scope);
57 $data = $this->attributeResource->getConnection()->fetchAll(
$select);
68 $optionText = isset($optionLabels[
$value[
'value_index']])
69 ? $optionLabels[
$value[
'value_index']]
71 $data[$key][
'default_title'] = $optionText;
72 $data[$key][
'option_title'] = $optionText;
getAttributeOptions(AbstractAttribute $superAttribute, $productId)
__construct(Attribute $attributeResource, ScopeResolverInterface $scopeResolver, OptionSelectBuilderInterface $optionSelectBuilder)