migrate_example.migrate.inc 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * @file
  4. * Because the name of this file is the module name plus '.migrate.inc', when
  5. * hook_migrate_api is invoked by the Migrate module this file is automatically
  6. * loaded - thus, you don't need to implement your hook in the .module file.
  7. */
  8. /*
  9. * You must implement hook_migrate_api(), setting the API level to 2, if you are
  10. * implementing any migration classes. As of Migrate 2.5, you should also
  11. * register your migration and handler classes explicitly here - the former
  12. * method of letting them get automatically registered on a cache clear will
  13. * break in certain environments (see http://drupal.org/node/1778952).
  14. */
  15. function migrate_example_migrate_api() {
  16. $api = array(
  17. 'api' => 2,
  18. 'migrations' => array(
  19. 'BeerTerm' => array('class_name' => 'BeerTermMigration'),
  20. 'BeerUser' => array('class_name' => 'BeerUserMigration'),
  21. 'BeerNode' => array('class_name' => 'BeerNodeMigration'),
  22. 'BeerComment' => array('class_name' => 'BeerCommentMigration'),
  23. 'WinePrep' => array('class_name' => 'WinePrepMigration'),
  24. 'WineVariety' => array('class_name' => 'WineVarietyMigration'),
  25. 'WineRegion' => array('class_name' => 'WineRegionMigration'),
  26. 'WineBestWith' => array('class_name' => 'WineBestWithMigration'),
  27. 'WineFileCopy' => array('class_name' => 'WineFileCopyMigration'),
  28. 'WineFileBlob' => array('class_name' => 'WineFileBlobMigration'),
  29. 'WineRole' => array('class_name' => 'WineRoleMigration'),
  30. 'WineUser' => array('class_name' => 'WineUserMigration'),
  31. 'WineProducer' => array('class_name' => 'WineProducerMigration'),
  32. 'WineProducerXML' => array('class_name' => 'WineProducerXMLMigration'),
  33. 'WineProducerMultiXML' => array('class_name' => 'WineProducerMultiXMLMigration'),
  34. 'WineProducerXMLPull' => array('class_name' => 'WineProducerXMLPullMigration'),
  35. 'WineWine' => array('class_name' => 'WineWineMigration'),
  36. 'WineComment' => array('class_name' => 'WineCommentMigration'),
  37. 'WineTable' => array('class_name' => 'WineTableMigration'),
  38. 'WineFinish' => array('class_name' => 'WineFinishMigration'),
  39. 'WineUpdates' => array('class_name' => 'WineUpdatesMigration'),
  40. 'WineCommentUpdates' => array('class_name' => 'WineCommentUpdatesMigration'),
  41. 'WineVarietyUpdates' => array('class_name' => 'WineVarietyUpdatesMigration'),
  42. 'WineUserUpdates' => array('class_name' => 'WineUserUpdatesMigration'),
  43. ),
  44. );
  45. return $api;
  46. }