You are here

function og_ui_migrate_api in Organic groups 7.2

Implements hook_migrate_api().

File

og_ui/og_ui.module, line 1190
Organic groups UI.

Code

function og_ui_migrate_api() {
  $migrations = array();
  if (db_table_exists('d6_og')) {
    $migrations['OgUiMigrateAddField'] = array(
      'class_name' => 'OgUiMigrateAddField',
    );
    $migrations['OgUiSetRoles'] = array(
      'class_name' => 'OgUiSetRoles',
    );
    foreach (node_type_get_names() as $bundle => $value) {
      $machine_name = 'OgUiPopulateField' . ucfirst($bundle);
      $migrations[$machine_name] = array(
        'class_name' => 'OgUiPopulateField',
        'bundle' => $bundle,
      );
    }
  }
  $api = array(
    'api' => 2,
    'migrations' => $migrations,
  );
  return $api;
}