You are here

function media_entity_update_8200 in Media entity 8.2

Clears the module handler's hook implementation cache.

File

./media_entity.install, line 295
Install, uninstall and update hooks for Media entity module.

Code

function media_entity_update_8200() {
  \Drupal::moduleHandler()
    ->resetImplementations();
  \Drupal::service('plugin.cache_clearer')
    ->clearCachedDefinitions();

  // Update the installed entity type so that system_update_8501() works.
  $entity_type = \Drupal::entityTypeManager()
    ->getDefinition('media');
  \Drupal::entityDefinitionUpdateManager()
    ->updateEntityType($entity_type);
}