Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ItemFactory.php
Go to the documentation of this file.
1 <?php
8 
10 
12 {
16  private $objectManager;
17 
21  public function __construct(
22  ObjectManagerInterface $objectManager
23  ) {
24  $this->objectManager = $objectManager;
25  }
26 
31  public function create(array $data)
32  {
33  return $this->objectManager->create(\Magento\Search\Model\Autocomplete\Item::class, ['data' => $data]);
34  }
35 }
$objectManager
Definition: bootstrap.php:17
__construct(ObjectManagerInterface $objectManager)
Definition: ItemFactory.php:21