You are here

public function Target::buildIndex in Drupal 7 to 8/9 Module Upgrader 8

Runs all available indexers on this target.

File

src/Target.php, line 164

Class

Target
Default implementation of TargetInterface.

Namespace

Drupal\drupalmoduleupgrader

Code

public function buildIndex() {
  $indexers = array_keys($this->indexerManager
    ->getDefinitions());
  foreach ($indexers as $id) {
    $this
      ->getIndexer($id)
      ->build();
  }

  // Release syntax trees that were opened during indexing.
  $this
    ->flush();
}