You are here

public function Search::hasValidIndex in Search API Autocomplete 8

Determines whether this search has a valid index set.

Return value

bool TRUE if the index this search belongs to can be loaded, FALSE otherwise.

Overrides SearchInterface::hasValidIndex

1 call to Search::hasValidIndex()
Search::getDependencyData in src/Entity/Search.php
Retrieves data about this search entity's dependencies.

File

src/Entity/Search.php, line 202

Class

Search
Describes the autocomplete settings for a certain search.

Namespace

Drupal\search_api_autocomplete\Entity

Code

public function hasValidIndex() {
  return $this->index || Index::load($this->index_id);
}