Skip to content

Commit 48f39c6

Browse files
committed
ACP2E-2885: Products graphql returned disabled categories in the category aggregations
1 parent 7ff8c29 commit 48f39c6

File tree

1 file changed

+75
-0
lines changed
  • app/code/Magento/Catalog/Model/Indexer/Category/Flat

1 file changed

+75
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?php
2+
/**
3+
* Copyright 2025 Adobe
4+
* All Rights Reserved.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Catalog\Model\Indexer\Category\Flat;
9+
10+
use Magento\Framework\Indexer\AbstractProcessor;
11+
use Magento\Framework\Indexer\IndexerRegistry;
12+
13+
class Processor extends AbstractProcessor
14+
{
15+
public const INDEXER_ID = State::INDEXER_ID;
16+
17+
/**
18+
* @param IndexerRegistry $indexerRegistry
19+
* @param State $state
20+
*/
21+
public function __construct(
22+
IndexerRegistry $indexerRegistry,
23+
private readonly State $state
24+
) {
25+
parent::__construct($indexerRegistry);
26+
}
27+
28+
/**
29+
* @inheritdoc
30+
*/
31+
public function reindexRow($id, $forceReindex = false)
32+
{
33+
if (!$this->state->isFlatEnabled()) {
34+
return;
35+
}
36+
37+
parent::reindexList($id, $forceReindex);
38+
}
39+
40+
/**
41+
* @inheritdoc
42+
*/
43+
public function reindexList($ids, $forceReindex = false)
44+
{
45+
if (!$this->state->isFlatEnabled()) {
46+
return;
47+
}
48+
49+
parent::reindexList($ids, $forceReindex);
50+
}
51+
52+
/**
53+
* @inheritdoc
54+
*/
55+
public function reindexAll()
56+
{
57+
if (!$this->state->isFlatEnabled()) {
58+
return;
59+
}
60+
61+
parent::reindexAll();
62+
}
63+
64+
/**
65+
* @inheritdoc
66+
*/
67+
public function markIndexerAsInvalid()
68+
{
69+
if (!$this->state->isFlatEnabled()) {
70+
return;
71+
}
72+
73+
parent::markIndexerAsInvalid();
74+
}
75+
}

0 commit comments

Comments
 (0)