Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Factory.php
Go to the documentation of this file.
1 <?php
7 
12 class Factory
13 {
17  protected $_objectManager;
18 
23  {
24  $this->_objectManager = $objectManager;
25  }
26 
33  public function create(array $data = [])
34  {
35  return $this->_objectManager->create(\Magento\Backend\Model\Menu\Item::class, ['data' => $data]);
36  }
37 }
$objectManager
Definition: bootstrap.php:17
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
Definition: Factory.php:22