You are here

public function SearchApiCommands::serverDisable in Search API 8

Disables a search server.

@command search-api:server-disable

@usage drush search-api:server-disable Disable the my_solr_server search server. @usage drush sapi-sd Alias to disable the my_solr_server search server.

@aliases sapi-sd,search-api-server-disable

Parameters

string $serverId: The machine name of a server.

Throws

\Drupal\search_api\ConsoleException Thrown if the server couldn't be loaded.

\Drupal\Core\Entity\EntityStorageException Thrown if an internal error occurred when saving the server.

File

src/Commands/SearchApiCommands.php, line 439

Class

SearchApiCommands
Defines Drush commands for the Search API.

Namespace

Drupal\search_api\Commands

Code

public function serverDisable($serverId) {
  $this->commandHelper
    ->disableServerCommand($serverId);
}