You are here

media_migration_test_change_tracking.module in Media Migration 8

Test helper module for change tracking.

File

tests/modules/media_migration_test_change_tracking/media_migration_test_change_tracking.module
View source
<?php

/**
 * @file
 * Test helper module for change tracking.
 */

/**
 * Implements hook_migration_plugins_alter().
 */
function media_migration_test_change_tracking_migration_plugins_alter(&$definitions) {
  foreach ($definitions as $id => $definition) {
    $destination = $definition['destination']['plugin'] ?? NULL;
    if ($destination === 'entity:media') {
      $definitions[$id]['source']['track_changes'] = TRUE;
    }
  }
}