mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-07 17:27:36 +00:00
36 lines
736 B
PHP
36 lines
736 B
PHP
<?php
|
|
/**
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
|
|
namespace Magento\Search\Model\Autocomplete;
|
|
|
|
use Magento\Framework\ObjectManagerInterface;
|
|
|
|
class ItemFactory
|
|
{
|
|
/**
|
|
* @var ObjectManagerInterface
|
|
*/
|
|
private $objectManager;
|
|
|
|
/**
|
|
* @param ObjectManagerInterface $objectManager
|
|
*/
|
|
public function __construct(
|
|
ObjectManagerInterface $objectManager
|
|
) {
|
|
$this->objectManager = $objectManager;
|
|
}
|
|
|
|
/**
|
|
* @param array $data
|
|
* @return Item
|
|
*/
|
|
public function create(array $data)
|
|
{
|
|
return $this->objectManager->create(\Magento\Search\Model\Autocomplete\Item::class, ['data' => $data]);
|
|
}
|
|
}
|