You are here

protected function Search::getAllPlugins in Search API Autocomplete 8

Retrieves all the plugins contained in this search entity.

Return value

\Drupal\search_api_autocomplete\Plugin\PluginInterface[][] All plugins contained in this search, keyed by the plugin type ("search_plugin" or "suggesters") and their plugin IDs.

2 calls to Search::getAllPlugins()
Search::getDependencyData in src/Entity/Search.php
Retrieves data about this search entity's dependencies.
Search::onDependencyRemoval in src/Entity/Search.php
Informs the entity that entities it depends on will be deleted.

File

src/Entity/Search.php, line 698

Class

Search
Describes the autocomplete settings for a certain search.

Namespace

Drupal\search_api_autocomplete\Entity

Code

protected function getAllPlugins() {
  $plugins = [];
  if ($this
    ->hasValidSearchPlugin()) {
    $plugin_id = $this
      ->getSearchPluginId();
    $plugins['search_plugin'][$plugin_id] = $this
      ->getSearchPlugin();
  }
  $plugins['suggesters'] = $this
    ->getSuggesters();
  return $plugins;
}