6 declare(strict_types=1);
29 private $attributeOptionsDataProvider;
34 private $valueFactory;
41 AttributeOptionsDataProvider $attributeOptionsDataProvider,
44 $this->attributeOptionsDataProvider = $attributeOptionsDataProvider;
45 $this->valueFactory = $valueFactory;
59 return $this->valueFactory->create(
function () use (
$value) {
73 private function getEntityType(array
$value): int
75 if (!isset(
$value[
'entity_type'])) {
79 return (
int)
$value[
'entity_type'];
87 private function getAttributeCode(array
$value): string
89 if (!isset(
$value[
'attribute_code'])) {
90 throw new GraphQlInputException(
__(
'"Attribute code should be specified'));
93 return $value[
'attribute_code'];
107 }
catch (InputException $e) {
108 throw new GraphQlInputException(
__($e->getMessage()), $e);
109 }
catch (StateException $e) {
110 throw new GraphQlNoSuchEntityException(
__($e->getMessage()), $e);
resolve(Field $field, $context, ResolveInfo $info, array $value=null, array $args=null)
foreach( $_productCollection as $_product)() ?>" class $info
__construct(AttributeOptionsDataProvider $attributeOptionsDataProvider, ValueFactory $valueFactory)