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 88namespace Magento \CatalogGraphQl \Model \Resolver \Category ;
99
1010use Magento \Catalog \Api \Data \CategoryInterface ;
11- use Magento \Catalog \Model \Category ;
1211use Magento \Framework \GraphQl \Exception \GraphQlNoSuchEntityException ;
1312use Magento \Framework \EntityManager \MetadataPool ;
1413use Magento \Catalog \Model \ResourceModel \Category \CollectionFactory ;
@@ -43,13 +42,13 @@ public function __construct(
4342 /**
4443 * Check if category is active.
4544 *
46- * @param int $rootCategoryId
45+ * @param int $categoryId
4746 * @throws GraphQlNoSuchEntityException
4847 */
49- public function execute (int $ rootCategoryId ): void
48+ public function execute (int $ categoryId ): void
5049 {
5150 $ collection = $ this ->collectionFactory ->create ();
52- $ collection ->addAttributeToFilter (Category ::KEY_IS_ACTIVE , ['eq ' => 1 ])
51+ $ collection ->addAttributeToFilter (CategoryInterface ::KEY_IS_ACTIVE , ['eq ' => 1 ])
5352 ->getSelect ()
5453 ->where (
5554 $ collection ->getSelect ()
@@ -58,7 +57,7 @@ public function execute(int $rootCategoryId): void
5857 'e. ' .
5958 $ this ->metadata ->getMetadata (CategoryInterface::class)->getIdentifierField ()
6059 ) . ' = ? ' ,
61- $ rootCategoryId
60+ $ categoryId
6261 );
6362
6463 if ($ collection ->count () === 0 ) {
You can’t perform that action at this time.
0 commit comments