You are here

protected function ContentEntityStorageTrait::indexEntityRevision in Multiversion 8

Same name and namespace in other branches
  1. 8.2 src/Entity/Storage/ContentEntityStorageTrait.php \Drupal\multiversion\Entity\Storage\ContentEntityStorageTrait::indexEntityRevision()

Indexes information about the revision.

Parameters

\Drupal\Core\Entity\EntityInterface $entity:

1 call to ContentEntityStorageTrait::indexEntityRevision()
ContentEntityStorageTrait::save in src/Entity/Storage/ContentEntityStorageTrait.php

File

src/Entity/Storage/ContentEntityStorageTrait.php, line 346

Class

ContentEntityStorageTrait

Namespace

Drupal\multiversion\Entity\Storage

Code

protected function indexEntityRevision(EntityInterface $entity) {
  $workspace = isset($entity->workspace) ? $entity->workspace->entity : null;
  \Drupal::service('multiversion.entity_index.factory')
    ->get('multiversion.entity_index.rev', $workspace)
    ->add($entity);
}