You are here

public function SearchApiCommands::serverEnable in Search API 8

Enables a search server.

@command search-api:server-enable

@usage drush search-api:server-enable my_solr_server Enable the my_solr_server search server. @usage drush sapi-se my_solr_server Alias to enable the my_solr_server search server.

@aliases sapi-se,search-api-server-enable

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 415

Class

SearchApiCommands
Defines Drush commands for the Search API.

Namespace

Drupal\search_api\Commands

Code

public function serverEnable($serverId) {
  $this->commandHelper
    ->enableServerCommand($serverId);
}