5
5
*/
6
6
namespace Magento \Setup \Controller ;
7
7
8
+ use Magento \Backend \Model \UrlInterface ;
9
+ use Magento \Setup \Exception ;
10
+ use Magento \Setup \Model \Cron \Status ;
8
11
use Magento \Setup \Model \Navigation as NavModel ;
12
+ use Magento \Setup \Model \ObjectManagerProvider ;
9
13
use Zend \Mvc \Controller \AbstractActionController ;
10
14
use Zend \View \Model \JsonModel ;
11
15
use Zend \View \Model \ViewModel ;
12
- use Magento \Setup \Model \Cron \Status ;
13
- use Magento \Setup \Model \ObjectManagerProvider ;
14
16
15
17
/**
16
18
* Class Navigation
@@ -47,7 +49,7 @@ public function __construct(NavModel $navigation, Status $status, ObjectManagerP
47
49
$ this ->navigation = $ navigation ;
48
50
$ this ->status = $ status ;
49
51
$ this ->objectManagerProvider = $ objectManagerProvider ;
50
- $ this ->view = new ViewModel ;
52
+ $ this ->view = new ViewModel () ;
51
53
$ this ->view ->setVariable ('menu ' , $ this ->navigation ->getMenuItems ());
52
54
$ this ->view ->setVariable ('main ' , $ this ->navigation ->getMainItems ());
53
55
}
@@ -57,7 +59,7 @@ public function __construct(NavModel $navigation, Status $status, ObjectManagerP
57
59
*/
58
60
public function indexAction ()
59
61
{
60
- $ json = new JsonModel ;
62
+ $ json = new JsonModel () ;
61
63
$ json ->setVariable ('nav ' , $ this ->navigation ->getData ());
62
64
$ json ->setVariable ('menu ' , $ this ->navigation ->getMenuItems ());
63
65
$ json ->setVariable ('main ' , $ this ->navigation ->getMainItems ());
@@ -79,11 +81,12 @@ public function menuAction()
79
81
80
82
/**
81
83
* @return array|ViewModel
84
+ * @throws Exception
82
85
*/
83
86
public function sideMenuAction ()
84
87
{
85
- /** @var \Magento\Backend\Model\ UrlInterface $backendUrl */
86
- $ backendUrl = $ this ->objectManagerProvider ->get ()->get (\ Magento \ Backend \ Model \ UrlInterface::class);
88
+ /** @var UrlInterface $backendUrl */
89
+ $ backendUrl = $ this ->objectManagerProvider ->get ()->get (UrlInterface::class);
87
90
88
91
$ this ->view ->setTemplate ('/magento/setup/navigation/side-menu.phtml ' );
89
92
$ this ->view ->setVariable ('isInstaller ' , $ this ->navigation ->getType () == NavModel::NAV_INSTALLER );
0 commit comments