contact_storage_test.install in Zircon Profile 8.0
Same filename and directory in other branches
Contains install and update hooks.
File
core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.installView source
<?php
/**
* @file
* Contains install and update hooks.
*/
/**
* Implements hook_install().
*/
function contact_storage_test_install() {
$entity_manager = \Drupal::entityManager();
$entity_type = $entity_manager
->getDefinition('contact_message');
// Recreate the original entity type definition, in order to notify the
// manager of what changed. The change of storage backend will trigger
// schema installation.
// @see contact_storage_test_entity_type_alter()
$original = clone $entity_type;
$original
->setStorageClass('Drupal\\Core\\Entity\\ContentEntityNullStorage');
$entity_manager
->onEntityTypeUpdate($entity_type, $original);
}
Functions
Name | Description |
---|---|
contact_storage_test_install | Implements hook_install(). |