You are here

public function Server::hasValidBackend in Search API 8

Determines whether the backend is valid.

Return value

bool TRUE if the backend is valid, FALSE otherwise.

Overrides ServerInterface::hasValidBackend

9 calls to Server::hasValidBackend()
Server::calculateDependencies in src/Entity/Server.php
Calculates dependencies and stores them in the dependency property.
Server::getBackendDefinedFields in src/Entity/Server.php
Provides information on additional fields made available by the backend.
Server::getDiscouragedProcessors in src/Entity/Server.php
Limits the processors displayed in the UI for indexes on this server.
Server::getSupportedFeatures in src/Entity/Server.php
Returns all features that this backend supports.
Server::isAvailable in src/Entity/Server.php
Returns a boolean with the availability of the backend.

... See full list

File

src/Entity/Server.php, line 129

Class

Server
Defines the search server configuration entity.

Namespace

Drupal\search_api\Entity

Code

public function hasValidBackend() {
  $backend_plugin_definition = \Drupal::service('plugin.manager.search_api.backend')
    ->getDefinition($this
    ->getBackendId(), FALSE);
  return !empty($backend_plugin_definition);
}