You are here

function migrate_get_module_apis in Migrate 7.2

Same name and namespace in other branches
  1. 6.2 migrate.module \migrate_get_module_apis()
  2. 6 migrate.module \migrate_get_module_apis()

Get a list of modules that support the current migrate API.

5 calls to migrate_get_module_apis()
migrate_migrations in ./migrate.module
Retrieve a list of all active migrations, ordered by dependencies. To be recognized, a class must be non-abstract, and derived from MigrationBase.
migrate_static_registration in ./migrate.module
Register any migrations defined in hook_migrate_api().
migrate_ui_wizard in migrate_ui/migrate_ui.wizard.inc
The primary formbuilder function for the wizard form.
migrate_ui_wizards in migrate_ui/migrate_ui.module
Get info on all modules supporting a migration wizard.
_migrate_class_list in ./migrate.module
For a given parent class, identify and instantiate objects for any non-abstract classes derived from the parent, returning an array of the objects indexed by class name. The array will be ordered such that any classes with dependencies are listed…

File

./migrate.module, line 330
API and drush commands to support migration of data from external sources into a Drupal installation.

Code

function migrate_get_module_apis($reset = FALSE) {
  static $cache = NULL;
  if ($reset) {
    $cache = NULL;
  }
  if (!isset($cache)) {
    $cache = array();
    foreach (module_implements('migrate_api') as $module) {
      $function = $module . '_migrate_api';
      $info = $function();
      if (isset($info['api']) && $info['api'] == MIGRATE_API_VERSION) {
        $cache[$module] = $info;
      }
      else {
        drupal_set_message(t('%function supports Migrate API version %modversion,
          Migrate module API version is %version - migration support not loaded.', array(
          '%function' => $function,
          '%modversion' => $info['api'],
          '%version' => MIGRATE_API_VERSION,
        )));
      }
    }

    // Allow modules to alter the migration information.
    drupal_alter('migrate_api', $cache);
  }
  return $cache;
}