PHP Class Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\ItemFactory

Author: Aurelien FOUCRET ([email protected])
Inheritance: extends Magento\Search\Model\Autocomplete\ItemFactory
Show file Open project: smile-sa/elasticsuite Class Usage Examples

Public Methods

Method Description
__construct ( Magento\Framework\ObjectManagerInterface $objectManager, Magento\Catalog\Helper\Image $imageHelper, Magento\Framework\Pricing\Render $priceRenderer ) Constructor.
create ( array $data ) {@inheritDoc}

Private Methods

Method Description
addProductData ( array $data ) : array Load product data and append them to the original data.
getImageUrl ( Magento\Catalog\Api\Data\ProductInterface $product ) : string Get resized image URL.
getPriceRenderer ( ) : boolean | Magento\Framework\View\Element\BlockInterface Retrieve Price Renderer Block
renderProductPrice ( Magento\Catalog\Model\Product $product, string $priceCode ) : string Renders product price.

Method Details

__construct() public method

Constructor.
public __construct ( Magento\Framework\ObjectManagerInterface $objectManager, Magento\Catalog\Helper\Image $imageHelper, Magento\Framework\Pricing\Render $priceRenderer )
$objectManager Magento\Framework\ObjectManagerInterface Object manager used to instantiate new item.
$imageHelper Magento\Catalog\Helper\Image Catalog product image helper.
$priceRenderer Magento\Framework\Pricing\Render Catalog product price renderer.

create() public method

{@inheritDoc}
public create ( array $data )
$data array