File tree Expand file tree Collapse file tree 1 file changed +75
-0
lines changed
app/code/Magento/Catalog/Model/Indexer/Category/Flat Expand file tree Collapse file tree 1 file changed +75
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments