You are here

rng_contact.install in RNG Contact 8

File

rng_contact.install
View source
<?php

/**
 * 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.
 */
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);
}

Functions

Namesort descending Description
rng_contact_update_8001 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.