You are here

function paragraphs_update_8008 in Paragraphs 8

Ensure that the parent indexes are added to the paragraphs entity.

File

./paragraphs.install, line 165
Installation hooks for Paragraphs module.

Code

function paragraphs_update_8008() {
  $manager = \Drupal::entityDefinitionUpdateManager();

  // Get the current paragraph entity type definition, ensure the storage schema
  // class is set.
  $entity_type = $manager
    ->getEntityType('paragraph')
    ->setHandlerClass('storage_schema', ParagraphStorageSchema::class);

  // Regenerate entity type indexes.
  $manager
    ->updateEntityType($entity_type);
}