public function SearchApiElasticsearchSpellcheck::__construct in Search API Elasticsearch 7
__construct
@access public
Parameters
mixed $data:
Return value
void
File
- includes/
SearchApiElasticsearchSpellcheck.inc, line 17 - Contains SearchApiElasticsearchSpellcheck
Class
- SearchApiElasticsearchSpellcheck
- @file Contains SearchApiElasticsearchSpellcheck
Code
public function __construct($data) {
foreach ($data['suggestions'] as $suggestion) {
$this
->addSuggestion(new SearchApiSpellcheckSuggestion($data['text'], $suggestion));
}
}