Skip to content
Snippets Groups Projects
Unverified Commit eb52a1a5 authored by Stefan Auditor's avatar Stefan Auditor Committed by Stefan Auditor
Browse files

Issue #3236771 by cecrs, sanduhrs: Entity Reference fields broken for PET Entities

parent 29d9cb18
No related branches found
No related tags found
No related merge requests found
<?php
/**
* @file
* Previewable Email Template install.
*/
/**
* Rename PET table to pets for consistency.
*/
function pet_update_8401() {
\Drupal::database()->schema()->renameTable('pet', 'pets');
}
/**
* Update PET entity data_table annotation.
*/
function pet_update_8402() {
// Replace values in the 'entity.definitions.installed' key_value collection.
\Drupal::service('entity_field.manager')->clearCachedFieldDefinitions();
$key_value_store_definition = \Drupal::keyValue('entity.definitions.installed');
$storage_definitions = $key_value_store_definition->get('pet.entity_type');
$storage_definitions->set('data_table', 'pets_field_data');
$key_value_store_definition->set('pet.entity_type', $storage_definitions);
}
......@@ -32,7 +32,8 @@ use Drupal\pet\PetInterface;
* },
* "access" = "Drupal\pet\PetAccessControlHandler",
* },
* base_table = "pets",
* base_table = "pet",
* data_table = "pets_field_data",
* admin_persmission = "administer previewable email templates",
* fieldable = FALSE,
* entity_keys = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment