public function SearchApiCommands::listCommand in Search API 8
Lists all search indexes.
@command search-api:list
@usage drush search-api:list List all search indexes.
@field-labels id: ID name: Name server: Server ID serverName: Server name types: Type IDs typeNames: Type names status: Status limit: Limit
@default-fields id,name,serverName,typeNames,status,limit
@aliases sapi-l,search-api-list
Return value
\Consolidation\OutputFormatters\StructuredData\RowsOfFields The table rows.
Throws
\Drupal\search_api\SearchApiException Thrown if an index has a server which couldn't be loaded.
File
- src/
Commands/ SearchApiCommands.php, line 85
Class
- SearchApiCommands
- Defines Drush commands for the Search API.
Namespace
Drupal\search_api\CommandsCode
public function listCommand() {
$rows = $this->commandHelper
->indexListCommand();
return new RowsOfMultiValueFields($rows);
}