You are here

protected function ContentEntityStorageTrait::indexEntity in Multiversion 8.2

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

Indexes basic information about the entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity:

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

File

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

Class

ContentEntityStorageTrait

Namespace

Drupal\multiversion\Entity\Storage

Code

protected function indexEntity(EntityInterface $entity) {
  $workspace = Workspace::load($this
    ->getWorkspaceId());
  $index_factory = \Drupal::service('multiversion.entity_index.factory');
  $index_factory
    ->get('multiversion.entity_index.id', $workspace)
    ->add($entity);
  $index_factory
    ->get('multiversion.entity_index.uuid', $workspace)
    ->add($entity);
}