You are here

function bibcite_entity_update_8026 in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x modules/bibcite_entity/bibcite_entity.install \bibcite_entity_update_8026()

Add config_export property to config entities.

File

modules/bibcite_entity/bibcite_entity.install, line 1205
Module installation hooks implementation.

Code

function bibcite_entity_update_8026() {
  $definition_update_manager = \Drupal::entityDefinitionUpdateManager();

  // Update Reference Type entity.
  $bibcite_reference_type = $definition_update_manager
    ->getEntityType('bibcite_reference_type');
  $bibcite_reference_type
    ->set('config_export', [
    'id',
    'label',
    'description',
    'new_revision',
  ]);
  $definition_update_manager
    ->updateEntityType($bibcite_reference_type);

  // Update Contributor Role entity.
  $bibcite_contributor_role = $definition_update_manager
    ->getEntityType('bibcite_contributor_role');
  $bibcite_contributor_role
    ->set('config_export', [
    'id',
    'label',
    'weight',
  ]);
  $definition_update_manager
    ->updateEntityType($bibcite_contributor_role);

  // Update Contributor Category entity.
  $bibcite_contributor_category = $definition_update_manager
    ->getEntityType('bibcite_contributor_category');
  $bibcite_contributor_category
    ->set('config_export', [
    'id',
    'label',
    'weight',
  ]);
  $definition_update_manager
    ->updateEntityType($bibcite_contributor_category);
}