You are here

function multiversion_update_8105 in Multiversion 8

Fix the migration status for already enabled entity types.

File

./multiversion.install, line 512

Code

function multiversion_update_8105() {
  $entity_types = \Drupal::entityTypeManager()
    ->getDefinitions();
  foreach ($entity_types as $entity_type_id => $entity_type) {
    if (is_subclass_of($entity_type
      ->getStorageClass(), ContentEntityStorageInterface::class)) {
      \Drupal::state()
        ->set("multiversion.migration_done.{$entity_type_id}", TRUE);
    }
  }
}