Advertisement
Guest User

Untitled

a guest
Oct 13th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.03 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * @file example_d2d.migrate.inc
  5.  */
  6.  
  7. /**
  8.  * Implements hook_migrate_api().
  9.  */
  10. function example_d2d_migrate_api(){
  11.   /**
  12.    * Declare the api version and migration group.
  13.   */
  14.  
  15.   $api = array(
  16.     'api' => 2,
  17.     'groups' => array(
  18.       'content_migration' => array(
  19.         'title' => t('Migrate content within Drupal'),
  20.       ),
  21.       'migrations' => array(),
  22.     ),
  23.   );
  24.  
  25.   $common_arguments = array(
  26.     'source_connection' => 'legacy',
  27.     'source_version' => 6,
  28.     'group_name' => 'content_migration',
  29.   );
  30.  
  31.   $node_arguments = array(
  32.     'news' => array(
  33.       'class_name' => 'MOHAAMapsMigration',
  34.       'description' => t('Migration of aaaamohaamaps to mohaa_maps'),
  35.       'source_type' => 'aaaamohaamaps',
  36.       'destination_type' => 'mohaa_maps',
  37.     ),
  38.   );
  39.  
  40.   foreach ($node_arguments as $migration_name => $arguments) {
  41.     $arguments = array_merge_recursive($arguments, $common_arguments);
  42.     $api['migrations'][$migration_name] = $arguments;
  43.   }
  44.  
  45.   return $api;
  46. }
  47.  
  48. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement