You are here

public function CommandHelper::loadServers in Search API 8

Returns the servers with the given IDs.

Parameters

array|null $serverIds: (optional) The IDs of the search servers to return, or NULL to load all servers.

Return value

\Drupal\search_api\ServerInterface[] An array of search servers.

5 calls to CommandHelper::loadServers()
CommandHelper::clearServerCommand in src/Utility/CommandHelper.php
Clears all indexes on a server.
CommandHelper::disableServerCommand in src/Utility/CommandHelper.php
Disables a server.
CommandHelper::enableServerCommand in src/Utility/CommandHelper.php
Enables a server.
CommandHelper::serverListCommand in src/Utility/CommandHelper.php
Returns a list of servers created on the page.
CommandHelper::setIndexServerCommand in src/Utility/CommandHelper.php
Switches an index to another server.

File

src/Utility/CommandHelper.php, line 675

Class

CommandHelper
Provides functionality to be used by CLI tools.

Namespace

Drupal\search_api\Utility

Code

public function loadServers(array $serverIds = NULL) {
  return $this->serverStorage
    ->loadMultiple($serverIds);
}