You are here

public function CommandHelper::loadIndexes in Search API 8

Returns the indexes with the given IDs.

Parameters

array|null $indexIds: (optional) The IDs of the search indexes to return, or NULL to load all indexes. An array with a single NULL value is interpreted the same way as passing NULL.

Return value

\Drupal\search_api\IndexInterface[] An array of search indexes.

11 calls to CommandHelper::loadIndexes()
CommandHelper::clearIndexCommand in src/Utility/CommandHelper.php
Deletes all items from one or more indexes.
CommandHelper::disableIndexCommand in src/Utility/CommandHelper.php
Disables one or more enabled search indexes.
CommandHelper::enableIndexCommand in src/Utility/CommandHelper.php
Enables one or more disabled search indexes.
CommandHelper::getIndexCount in src/Utility/CommandHelper.php
Returns the total number of search indexes.
CommandHelper::indexItemsToIndexCommand in src/Utility/CommandHelper.php
Indexes items on one or more indexes.

... See full list

File

src/Utility/CommandHelper.php, line 658

Class

CommandHelper
Provides functionality to be used by CLI tools.

Namespace

Drupal\search_api\Utility

Code

public function loadIndexes(array $indexIds = NULL) {
  if ($indexIds === [
    NULL,
  ]) {
    $indexIds = NULL;
  }
  return $this->indexStorage
    ->loadMultiple($indexIds);
}