10
10
use Zend \View \Model \JsonModel ;
11
11
use Zend \View \Model \ViewModel ;
12
12
use Magento \Setup \Model \Cron \Status ;
13
+ use Magento \Setup \Model \ObjectManagerProvider ;
13
14
14
15
/**
15
16
* Class Navigation
@@ -32,14 +33,20 @@ class Navigation extends AbstractActionController
32
33
*/
33
34
protected $ view ;
34
35
36
+ /**
37
+ * @var ObjectManagerProvider $objectManagerProvider
38
+ */
39
+ protected $ objectManagerProvider ;
40
+
35
41
/**
36
42
* @param NavModel $navigation
37
43
* @param Status $status
38
44
*/
39
- public function __construct (NavModel $ navigation , Status $ status )
45
+ public function __construct (NavModel $ navigation , Status $ status, ObjectManagerProvider $ objectManagerProvider )
40
46
{
41
47
$ this ->navigation = $ navigation ;
42
48
$ this ->status = $ status ;
49
+ $ this ->objectManagerProvider = $ objectManagerProvider ;
43
50
$ this ->view = new ViewModel ;
44
51
$ this ->view ->setVariable ('menu ' , $ this ->navigation ->getMenuItems ());
45
52
$ this ->view ->setVariable ('main ' , $ this ->navigation ->getMainItems ());
@@ -75,8 +82,12 @@ public function menuAction()
75
82
*/
76
83
public function sideMenuAction ()
77
84
{
85
+ /** @var \Magento\Backend\Model\UrlInterface $backendUrl */
86
+ $ backendUrl = $ this ->objectManagerProvider ->get ()->get (\Magento \Backend \Model \UrlInterface::class);
87
+
78
88
$ this ->view ->setTemplate ('/magento/setup/navigation/side-menu.phtml ' );
79
89
$ this ->view ->setVariable ('isInstaller ' , $ this ->navigation ->getType () == NavModel::NAV_INSTALLER );
90
+ $ this ->view ->setVariable ('backendUrl ' , $ backendUrl ->getRouteUrl ('adminhtml ' ));
80
91
$ this ->view ->setTerminal (true );
81
92
return $ this ->view ;
82
93
}
0 commit comments