/** * Constructor. * * @param Context $context Helper context. * @param StoreManagerInterface $storeManager Store manager. * @param StockConfigurationInterface $stockConfiguration Stock Configuration Interface. * @param MappingHelper $mappingHelper Mapping helper. */ public function __construct(Context $context, StoreManagerInterface $storeManager, StockConfigurationInterface $stockConfiguration, MappingHelper $mappingHelper) { parent::__construct($context, $storeManager); $this->storeManager = $storeManager; $this->stockConfiguration = $stockConfiguration; $this->mappingHelper = $mappingHelper; }
/** * Retrieve number of products to display in autocomplete results * * @return int */ private function getResultsPageSize() { return $this->configurationHelper->getMaxSize($this->getType()); }