Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
NodeFactory.php
Go to the documentation of this file.
1 <?php
8 
10 
15 {
21  protected $objectManager;
22 
28  protected $instanceName;
29 
36  public function __construct(
38  $instanceName = \Magento\Framework\Data\Tree\Node::class
39  ) {
40  $this->objectManager = $objectManager;
41  $this->instanceName = $instanceName;
42  }
43 
50  public function create(array $data = [])
51  {
52  return $this->objectManager->create($this->instanceName, $data);
53  }
54 }
__construct(ObjectManagerInterface $objectManager, $instanceName=\Magento\Framework\Data\Tree\Node::class)
Definition: NodeFactory.php:36