File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
app/code/Magento/CatalogGraphQl/Model/Resolver/Category Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 8
8
namespace Magento \CatalogGraphQl \Model \Resolver \Category ;
9
9
10
10
use Magento \Catalog \Api \Data \CategoryInterface ;
11
- use Magento \Catalog \Model \Category ;
12
11
use Magento \Framework \GraphQl \Exception \GraphQlNoSuchEntityException ;
13
12
use Magento \Framework \EntityManager \MetadataPool ;
14
13
use Magento \Catalog \Model \ResourceModel \Category \CollectionFactory ;
@@ -43,13 +42,13 @@ public function __construct(
43
42
/**
44
43
* Check if category is active.
45
44
*
46
- * @param int $rootCategoryId
45
+ * @param int $categoryId
47
46
* @throws GraphQlNoSuchEntityException
48
47
*/
49
- public function execute (int $ rootCategoryId ): void
48
+ public function execute (int $ categoryId ): void
50
49
{
51
50
$ collection = $ this ->collectionFactory ->create ();
52
- $ collection ->addAttributeToFilter (Category ::KEY_IS_ACTIVE , ['eq ' => 1 ])
51
+ $ collection ->addAttributeToFilter (CategoryInterface ::KEY_IS_ACTIVE , ['eq ' => 1 ])
53
52
->getSelect ()
54
53
->where (
55
54
$ collection ->getSelect ()
@@ -58,7 +57,7 @@ public function execute(int $rootCategoryId): void
58
57
'e. ' .
59
58
$ this ->metadata ->getMetadata (CategoryInterface::class)->getIdentifierField ()
60
59
) . ' = ? ' ,
61
- $ rootCategoryId
60
+ $ categoryId
62
61
);
63
62
64
63
if ($ collection ->count () === 0 ) {
You can’t perform that action at this time.
0 commit comments