Skip to content
Snippets Groups Projects
Commit 99d7e65a authored by Pavnish kumar's avatar Pavnish kumar Committed by Carsten Logemann
Browse files

Issue #3132326 by pavnish, harshit97: Link Extract Issue

parent 50571328
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ use Drupal\Core\DependencyInjection\DependencySerializationTrait;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Messenger\MessengerTrait;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\Entity\FieldableEntityInterface;
/**
* Helper service to handle extraction index.
......@@ -113,9 +114,12 @@ class LinkExtractorBatch {
$storage = $this->entityTypeManager->getStorage($entityType->id());
foreach ($ids as $id) {
$entity = $storage->load($id);
$links = $this->extractor->extractFromEntity($entity);
$this->extractor->saveLinkMultiple($links);
$this->extractor->updateEntityExtractIndex($entity);
if ($entity instanceof FieldableEntityInterface){
$links = $this->extractor->extractFromEntity($entity);
$this->extractor->saveLinkMultiple($links);
$this->extractor->updateEntityExtractIndex($entity);
}
$numberOfProcessedItems++;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment