You are here

public function SearchPluginInterface::createQuery in Search API Autocomplete 8

Creates a search query based on this search.

Parameters

string $keys: The keywords to set on the query, if possible. Otherwise, this parameter can also be ignored.

array $data: (optional) Additional data passed to the callback.

Return value

\Drupal\search_api\Query\QueryInterface The created query.

Throws

\Drupal\search_api_autocomplete\SearchApiAutocompleteException Thrown if the query couldn't be created.

3 methods override SearchPluginInterface::createQuery()
Page::createQuery in src/Plugin/search_api_autocomplete/search/Page.php
Creates a search query based on this search.
TestSearch::createQuery in tests/search_api_autocomplete_test/src/Plugin/search_api_autocomplete/search/TestSearch.php
Creates a search query based on this search.
Views::createQuery in src/Plugin/search_api_autocomplete/search/Views.php
Creates a search query based on this search.

File

src/Search/SearchPluginInterface.php, line 69

Class

SearchPluginInterface
Defines the autocomplete search plugin type.

Namespace

Drupal\search_api_autocomplete\Search

Code

public function createQuery($keys, array $data = []);