You are here

function opigno_moxtra_update_8007 in Opigno Moxtra 8

Creates the opigno_moxtra_meeting_result entity type.

File

./opigno_moxtra.install, line 204
Install, update and uninstall functions for the Opigno Moxtra module.

Code

function opigno_moxtra_update_8007() {
  $schema = \Drupal::database()
    ->schema();
  if (!$schema
    ->tableExists('opigno_moxtra_meeting_result')) {
    $entity_type_manager = \Drupal::entityTypeManager();
    $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager();
    $entity_type_manager
      ->clearCachedDefinitions();
    $definition = $entity_type_manager
      ->getDefinition('opigno_moxtra_meeting_result');
    $entity_definition_update_manager
      ->installEntityType($definition);
  }
}