Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CommandFactory.php
Go to the documentation of this file.
1 <?php
7 
14 {
18  protected $_objectManager;
19 
24  {
25  $this->_objectManager = $objectManager;
26  }
27 
35  public function create($commandName, array $data = [])
36  {
37  return $this->_objectManager->create(
38  'Magento\Backend\Model\Menu\Builder\Command\\' . ucfirst($commandName),
39  $data
40  );
41  }
42 }
$objectManager
Definition: bootstrap.php:17
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)