ItemSearchAutocompleteService
This service class contains functions for the autocompletion of the item search.
All public functions are available in the Twig template renderer.
Namespace
IO\Services
Type | Name | Description |
---|---|---|
|
||
|
||
|
Methods
public __construct($urlBuilderRepository, $localizationRepository, $webstoreConfigurationRepository)
ItemSearchAutocompleteService constructor.
Type |
Name |
Description |
|
||
|
||
|
public getDidYouMeanSuggestionSearchString($searchString, $suggestions):string
Gets a "Did you mean X?" string based on suggestions
Type |
Name |
Description |
|
Original search string |
|
|
Search suggestions based on search string |
public getResults($searchString, $searchTypes):array
Get an item search result for the search string based on the chosen search types
Type |
Name |
Description |
|
The search string |
|
|
What types of search to execute |
public transformResult($itemSearchResult):array
Transform the item search result into a flatter format
Type |
Name |
Description |
|
Raw item search result |