You are here

public function Search::hasValidSearchPlugin in Search API Autocomplete 8

Determines whether the search plugin set for this search is valid.

Return value

bool TRUE if the search plugin is valid, FALSE otherwise.

Overrides SearchInterface::hasValidSearchPlugin

1 call to Search::hasValidSearchPlugin()
Search::getAllPlugins in src/Entity/Search.php
Retrieves all the plugins contained in this search entity.

File

src/Entity/Search.php, line 326

Class

Search
Describes the autocomplete settings for a certain search.

Namespace

Drupal\search_api_autocomplete\Entity

Code

public function hasValidSearchPlugin() {
  return (bool) \Drupal::getContainer()
    ->get('plugin.manager.search_api_autocomplete.search')
    ->getDefinition($this
    ->getSearchPluginId(), FALSE);
}