public function getMaxSize($type = null) { if ($type === null) { throw new \LogicException('Autocomplete type is missing'); } $configPath = sprintf("%s_autocomplete/max_size", $type); return (int) $this->getConfigValue($configPath); }
/** * Retrieve number of products to display in autocomplete results * * @return int */ private function getResultsPageSize() { return $this->configurationHelper->getMaxSize($this->getType()); }