You are here

public function SearchApiCommands::serverList in Search API 8

Lists all search servers.

@command search-api:server-list

@usage drush search-api:server-list List all search servers. @usage drush sapi-sl Alias to list all search servers.

@field-labels id: ID name: Name status: Status

@aliases sapi-sl,search-api-server-list

Return value

\Consolidation\OutputFormatters\StructuredData\RowsOfFields The table rows.

Throws

\Drupal\search_api\ConsoleException Thrown if no servers could be loaded.

File

src/Commands/SearchApiCommands.php, line 389

Class

SearchApiCommands
Defines Drush commands for the Search API.

Namespace

Drupal\search_api\Commands

Code

public function serverList() {
  $rows = $this->commandHelper
    ->serverListCommand();
  return new RowsOfFields($rows);
}