You are here

function rng_contact_update_8001 in RNG Contact 8

Removed unused data table. Only used for translatable entities. Add a storage schema class for the purposes of removing unused data table. Add views integration for RNG contact.

1 string reference to 'rng_contact_update_8001'
RngContactStorageSchema::hasSharedTableNameChanges in src/RngContactStorageSchema.php
@inheritDoc

File

./rng_contact.install, line 8

Code

function rng_contact_update_8001() {
  drupal_static('rng_contact_update_8001', TRUE);
  $manager = \Drupal::entityDefinitionUpdateManager();
  $entity_type = $manager
    ->getEntityType('rng_contact')
    ->set('data_table', NULL)
    ->setHandlerClass('views_data', 'Drupal\\rng_contact\\Views\\RngContactViewsData')
    ->setHandlerClass('storage_schema', 'Drupal\\rng_contact\\RngContactStorageSchema');
  $manager
    ->updateEntityType($entity_type);
  drupal_static('rng_contact_update_8001', FALSE);
}