File tree Expand file tree Collapse file tree 4 files changed +78
-2
lines changed
lib/internal/Magento/Framework/Indexer/Config Expand file tree Collapse file tree 4 files changed +78
-2
lines changed Original file line number Diff line number Diff line change 2005
2005
<preference for =" Magento\Framework\Filter\Input\PurifierInterface" type =" Magento\Framework\Filter\Input\Purifier" />
2006
2006
<preference for =" Magento\Framework\App\PageCache\IdentifierInterface" type =" Magento\Framework\App\PageCache\Identifier" />
2007
2007
<preference for =" Magento\Framework\App\State\ReloadProcessorInterface" type =" Magento\Framework\App\State\ReloadProcessorComposite" />
2008
+ <preference for =" Magento\Framework\Indexer\Config\Converter\SortingAdjustmentInterface" type =" Magento\Framework\Indexer\Config\Converter\SortingAdjustment" />
2008
2009
</config >
Original file line number Diff line number Diff line change 8
8
use Magento \Framework \Config \ConverterInterface ;
9
9
use Magento \Framework \Exception \ConfigurationMismatchException ;
10
10
use Magento \Framework \Phrase ;
11
+ use Magento \Framework \Indexer \Config \Converter \SortingAdjustmentInterface ;
11
12
12
13
class Converter implements ConverterInterface
13
14
{
15
+ /**
16
+ * @var SortingAdjustmentInterface
17
+ */
18
+ private SortingAdjustmentInterface $ sortingAdjustment ;
19
+
20
+ public function __construct (SortingAdjustmentInterface $ sortingAdjustment )
21
+ {
22
+ $ this ->sortingAdjustment = $ sortingAdjustment ;
23
+ }
24
+
14
25
/**
15
26
* Convert dom node tree to array
16
27
*
@@ -47,8 +58,7 @@ public function convert($source)
47
58
$ output [$ indexerId ] = $ data ;
48
59
}
49
60
$ output = $ this ->sortByDependencies ($ output );
50
-
51
- return $ output ;
61
+ return $ this ->sortingAdjustment ->adjust ($ output );
52
62
}
53
63
54
64
/**
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /************************************************************************
3
+ *
4
+ * Copyright 2024 Adobe
5
+ * All Rights Reserved.
6
+ *
7
+ * NOTICE: All information contained herein is, and remains
8
+ * the property of Adobe and its suppliers, if any. The intellectual
9
+ * and technical concepts contained herein are proprietary to Adobe
10
+ * and its suppliers and are protected by all applicable intellectual
11
+ * property laws, including trade secret and copyright laws.
12
+ * Dissemination of this information or reproduction of this material
13
+ * is strictly forbidden unless prior written permission is obtained
14
+ * from Adobe.
15
+ * ************************************************************************
16
+ */
17
+ declare (strict_types=1 );
18
+
19
+ namespace Magento \Framework \Indexer \Config \Converter ;
20
+
21
+ class SortingAdjustment implements SortingAdjustmentInterface
22
+ {
23
+ /**
24
+ * @inheirtdoc
25
+ */
26
+ public function adjust (array $ indexersList ): array
27
+ {
28
+ return $ indexersList ;
29
+ }
30
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /************************************************************************
3
+ *
4
+ * Copyright 2024 Adobe
5
+ * All Rights Reserved.
6
+ *
7
+ * NOTICE: All information contained herein is, and remains
8
+ * the property of Adobe and its suppliers, if any. The intellectual
9
+ * and technical concepts contained herein are proprietary to Adobe
10
+ * and its suppliers and are protected by all applicable intellectual
11
+ * property laws, including trade secret and copyright laws.
12
+ * Dissemination of this information or reproduction of this material
13
+ * is strictly forbidden unless prior written permission is obtained
14
+ * from Adobe.
15
+ * ************************************************************************
16
+ */
17
+ declare (strict_types=1 );
18
+
19
+ namespace Magento \Framework \Indexer \Config \Converter ;
20
+
21
+ /**
22
+ * Interface for managing sort order of indexers
23
+ *
24
+ * Make sense for the full reindex when you need to adjust order od indexers execution
25
+ */
26
+ interface SortingAdjustmentInterface
27
+ {
28
+ /**
29
+ * Make adjustments in the indexers list
30
+ *
31
+ * @param array $indexersList
32
+ * @return array
33
+ */
34
+ public function adjust (array $ indexersList ) : array ;
35
+ }
You can’t perform that action at this time.
0 commit comments