You are here

public function LinkCheckerCommands::analyze in Link checker 8

Reanalyzes content for links. Recommended after module has been upgraded.

@command linkchecker:analyze

@aliases lca

File

src/Commands/LinkCheckerCommands.php, line 80

Class

LinkCheckerCommands
Drush 9 commands for Linkchecker module.

Namespace

Drupal\linkchecker\Commands

Code

public function analyze() {
  $this
    ->analyzeCheckParams();
  $total = $this->extractorBatch
    ->getTotalEntitiesToProcess();
  if (!empty($total)) {
    $this->extractorBatch
      ->batch();
    drush_backend_batch_process();
  }
  else {
    $this
      ->logger()
      ->warning('No content configured for link analysis.');
  }
}