You are here

function workbench_access_update_8004 in Workbench Access 8

Create the new section association entity type.

File

./workbench_access.install, line 48
Install, update and uninstall functions for the Workbench Access module.

Code

function workbench_access_update_8004() {
  $entity_manager = \Drupal::entityTypeManager();
  $update_manager = \Drupal::entityDefinitionUpdateManager();

  // Install 'section_association' content entity.
  $entity_manager
    ->clearCachedDefinitions();
  $type = $entity_manager
    ->getDefinition('section_association');
  $update_manager
    ->installEntityType($type);
}