Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
13 | public function execute() |
||
14 | { |
||
15 | $zendApplication = \Zend\Mvc\Application::init( |
||
16 | require $this->getMagentoRootFolder() . '/setup/config/application.config.php' |
||
17 | ); |
||
18 | |||
19 | $serviceManager = $zendApplication->getServiceManager(); |
||
20 | $this->config->setObject('zendServiceManager', $serviceManager); |
||
21 | |||
22 | $setupFactory = $serviceManager->get('Magento\Setup\Module\SetupFactory'); |
||
23 | /* @var $setupFactory \Magento\Setup\Module\SetupFactory */ |
||
24 | $this->config->setObject('setupFactory', $setupFactory); |
||
25 | |||
26 | $moduleList = $this->getCommand() |
||
27 | ->getApplication() |
||
28 | ->getObjectManager()->get('Magento\Framework\Module\ModuleListInterface'); |
||
29 | |||
30 | /* @var $modules \Magento\Framework\Module\ModuleListInterface */ |
||
31 | $this->config->setArray('moduleNames', $moduleList->getNames()); |
||
32 | |||
33 | $logger = new BridgetConsoleLogger($this->output); |
||
34 | /* @var $logger \Magento\Setup\Model\LoggerInterface */ |
||
35 | $this->config->setObject('logger', $logger); |
||
36 | |||
37 | return true; |
||
38 | } |
||
39 | |||
48 |