You are here

protected function IndexOverviewForm::loadAutocompleteSearchByIndex in Search API Autocomplete 8

Load the autocomplete plugins for an index.

Parameters

string $index_id: The index ID.

Return value

\Drupal\search_api_autocomplete\SearchInterface[] An array of autocomplete plugins.

1 call to IndexOverviewForm::loadAutocompleteSearchByIndex()
IndexOverviewForm::buildForm in src/Form/IndexOverviewForm.php
Form constructor.

File

src/Form/IndexOverviewForm.php, line 303

Class

IndexOverviewForm
Defines the overview of all search autocompletion configurations.

Namespace

Drupal\search_api_autocomplete\Form

Code

protected function loadAutocompleteSearchByIndex($index_id) {

  /** @var \Drupal\search_api_autocomplete\SearchInterface[] $searches */
  $searches = $this->entityTypeManager
    ->getStorage('search_api_autocomplete_search')
    ->loadByProperties([
    'index_id' => $index_id,
  ]);
  return $searches;
}