Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
EntityStorageFactory.php
Go to the documentation of this file.
1 <?php
7 
9 
16 {
22  protected $objectManager = null;
23 
29  protected $instanceName = null;
30 
37  public function __construct(
39  $instanceName = \Magento\Framework\Search\Dynamic\EntityStorage::class
40  ) {
41  $this->objectManager = $objectManager;
42  $this->instanceName = $instanceName;
43  }
44 
51  public function create($source)
52  {
53  return $this->objectManager->create($this->instanceName, ['source' => $source]);
54  }
55 }
$source
Definition: source.php:23
__construct(ObjectManagerInterface $objectManager, $instanceName=\Magento\Framework\Search\Dynamic\EntityStorage::class)