You are here

public function Server::getIndexes in Search API 8

Retrieves a list of indexes which use this server.

Parameters

array $properties: (optional) Additional properties that the indexes should have.

Return value

\Drupal\search_api\IndexInterface[] An array of all matching search indexes.

Overrides ServerInterface::getIndexes

3 calls to Server::getIndexes()
Server::deleteAllItems in src/Entity/Server.php
Deletes all items on this server, except those from read-only indexes.
Server::postSave in src/Entity/Server.php
Acts on a saved entity before the insert or update hook is invoked.
Server::preSave in src/Entity/Server.php
Acts on an entity before the presave hook is invoked.

File

src/Entity/Server.php, line 182

Class

Server
Defines the search server configuration entity.

Namespace

Drupal\search_api\Entity

Code

public function getIndexes(array $properties = []) {
  $storage = \Drupal::entityTypeManager()
    ->getStorage('search_api_index');
  return $storage
    ->loadByProperties([
    'server' => $this
      ->id(),
  ] + $properties);
}