We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8222455 + f5ad6ec commit 2929dfaCopy full SHA for 2929dfa
app/code/Magento/CatalogGraphQl/Model/Category/LevelCalculator.php
@@ -15,6 +15,16 @@
15
*/
16
class LevelCalculator
17
{
18
+ /**
19
+ * @var ResourceConnection
20
+ */
21
+ private $resourceConnection;
22
+
23
24
+ * @var Category
25
26
+ private $resourceCategory;
27
28
/**
29
* @param ResourceConnection $resourceConnection
30
* @param Category $resourceCategory
@@ -39,6 +49,7 @@ public function calculate(int $rootCategoryId) : int
39
49
$select = $connection->select()
40
50
->from($this->resourceConnection->getTableName('catalog_category_entity'), 'level')
41
51
->where($this->resourceCategory->getLinkField() . " = ?", $rootCategoryId);
52
42
53
return (int) $connection->fetchOne($select);
43
54
}
44
55
0 commit comments