5 * Contains install and update hooks.
9 * Implements hook_install().
11 function contact_storage_test_install() {
12 $entity_manager = \Drupal::entityManager();
13 $entity_type = $entity_manager->getDefinition('contact_message');
15 // Recreate the original entity type definition, in order to notify the
16 // manager of what changed. The change of storage backend will trigger
17 // schema installation.
18 // @see contact_storage_test_entity_type_alter()
19 $original = clone $entity_type;
20 $original->setStorageClass('Drupal\Core\Entity\ContentEntityNullStorage');
22 $entity_manager->onEntityTypeUpdate($entity_type, $original);