Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
TreeFactory.php
Go to the documentation of this file.
1 <?php
7 namespace Magento\Framework\Data;
8 
10 
15 {
21  protected $objectManager = null;
22 
28  protected $instanceName = null;
29 
36  public function __construct(
38  $instanceName = \Magento\Framework\Data\Tree::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::class)
Definition: TreeFactory.php:36