Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
JackerNgo committed Oct 26, 2020
2 parents 1f62b8b + 3194abc commit 56e05f1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions Model/Resolver/Brands/FilterArgument/EntityAttributesForAst.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
namespace Mageplaza\ShopbybrandGraphQl\Model\Resolver\Brands\FilterArgument;

use Magento\Framework\GraphQl\Query\Resolver\Argument\FieldEntityAttributesInterface;
use Mageplaza\Shopbybrand\Helper\Data;

/**
* Class EntityAttributesForAst
Expand All @@ -41,14 +42,22 @@ class EntityAttributesForAst implements FieldEntityAttributesInterface
'tdv.value',
'tdv.default_value'
];
/**
* @var Data
*/
protected $helperData;

/**
* EntityAttributesForAst constructor.
*
* @param Data $helperData
* @param array $additionalAttributes
*/
public function __construct(array $additionalAttributes = [])
{
public function __construct(
Data $helperData,
array $additionalAttributes = []
) {
$this->helperData = $helperData;
$this->additionalAttributes = array_merge($this->additionalAttributes, $additionalAttributes);
}

Expand All @@ -62,6 +71,10 @@ public function getEntityAttributes(): array
$fields[$attribute] = 'String';
}

if ($this->helperData->versionCompare('2.3.4')) {
return $fields;
}

return array_keys($fields);
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mageplaza/module-shop-by-brand-graphql",
"description": "Magento 2 Shop By Brand GraphQl Extension",
"type": "magento2-module",
"version": "1.0.0",
"version": "1.0.1",
"license": "proprietary",
"authors": [
{
Expand Down

0 comments on commit 56e05f1

Please sign in to comment.