You are here

public function Index::hasValidServer in Search API 8

Determines whether this index is lying on a valid server.

Return value

bool TRUE if the index's server is set and valid, otherwise FALSE.

Overrides IndexInterface::hasValidServer

6 calls to Index::hasValidServer()
Index::getDependencyData in src/Entity/Index.php
Retrieves data about this index's dependencies.
Index::getFields in src/Entity/Index.php
Returns a list of all indexed fields of this index.
Index::isServerEnabled in src/Entity/Index.php
Checks if this index has an enabled server.
Index::reactToDatasourceSwitch in src/Entity/Index.php
Checks whether the index's datasources changed and reacts accordingly.
Index::reactToServerSwitch in src/Entity/Index.php
Checks whether the index switched server and reacts accordingly.

... See full list

File

src/Entity/Index.php, line 478

Class

Index
Defines the search index configuration entity.

Namespace

Drupal\search_api\Entity

Code

public function hasValidServer() {
  return $this->serverInstance || $this->server !== NULL && Server::load($this->server);
}