File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \Backend \Model \Setup ;
7
+
8
+ use Magento \Backend \Model \Menu ;
9
+ use Magento \Backend \Model \Menu \Builder ;
10
+ use Magento \Framework \App \DocRootLocator ;
11
+
12
+ /**
13
+ * Plugin class to remove web setup wizard from menu if application root is pub/ and no setup url variable is specified.
14
+ * @api
15
+ * @since 100.1.0
16
+ * @deprecated Starting from Magento 2.3.6 Web Setup Wizard is deprecated
17
+ */
18
+ class MenuBuilder
19
+ {
20
+ /**
21
+ * @var DocRootLocator
22
+ * @since 100.1.0
23
+ */
24
+ protected $ docRootLocator ;
25
+
26
+ /**
27
+ * MenuBuilder constructor.
28
+ *
29
+ * @param DocRootLocator $docRootLocator
30
+ */
31
+ public function __construct (DocRootLocator $ docRootLocator )
32
+ {
33
+ $ this ->docRootLocator = $ docRootLocator ;
34
+ }
35
+
36
+ /**
37
+ * Removes 'Web Setup Wizard' from the menu if doc root is pub and no setup url variable is specified.
38
+ *
39
+ * @param Builder $subject
40
+ * @param Menu $menu
41
+ * @return Menu
42
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
43
+ * @since 100.1.0
44
+ */
45
+ public function afterGetResult (Builder $ subject , Menu $ menu )
46
+ {
47
+ if ($ this ->docRootLocator ->isPub ()) {
48
+ $ menu ->remove ('Magento_Backend::setup_wizard ' );
49
+ }
50
+ return $ menu ;
51
+ }
52
+ }
Original file line number Diff line number Diff line change 137
137
<argument name =" isIncludesAvailable" xsi : type =" boolean" >false</argument >
138
138
</arguments >
139
139
</type >
140
+ <type name =" Magento\Backend\Model\Menu\Builder" >
141
+ <plugin name =" SetupMenuBuilder" type =" Magento\Backend\Model\Setup\MenuBuilder" />
142
+ </type >
140
143
<type name =" Magento\Config\Model\Config\Structure\ElementVisibility\ConcealInProduction" >
141
144
<arguments >
142
145
<argument name =" configs" xsi : type =" array" >
You can’t perform that action at this time.
0 commit comments