You are here

function migrate_ui_menu in Migrate 7.2

Implementation of hook_menu().

File

migrate_ui/migrate_ui.module, line 13

Code

function migrate_ui_menu() {
  $items = array();
  $items['admin/content/migrate'] = array(
    'type' => MENU_LOCAL_TASK | MENU_NORMAL_ITEM,
    'title' => 'Migrate',
    'description' => 'Manage importing of data into your Drupal site',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'migrate_ui_migrate_dashboard',
    ),
    'access arguments' => array(
      MIGRATE_ACCESS_BASIC,
    ),
    'access callback' => 'user_access',
    'file' => 'migrate_ui.pages.inc',
  );
  $items['admin/content/migrate/groups'] = array(
    'title' => 'Dashboard',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/content/migrate/configure'] = array(
    'title' => 'Configuration',
    'type' => MENU_LOCAL_TASK,
    'description' => 'Configure migration settings',
    'page callback' => 'migrate_ui_configure',
    'access arguments' => array(
      MIGRATE_ACCESS_ADVANCED,
    ),
    'file' => 'migrate_ui.pages.inc',
    'weight' => 100,
  );

  // Add tabs for each implemented migration wizard.
  $wizards = migrate_ui_wizards();
  foreach ($wizards as $wizard_class => $wizard) {
    $items["admin/content/migrate/new/{$wizard_class}"] = array(
      'type' => MENU_LOCAL_TASK,
      'title' => 'Import from @source_title',
      'title arguments' => array(
        '@source_title' => $wizard
          ->getSourceName(),
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'migrate_ui_wizard',
        $wizard_class,
      ),
      'access arguments' => array(
        MIGRATE_ACCESS_BASIC,
      ),
      'file' => 'migrate_ui.wizard.inc',
    );
  }
  $items['admin/content/migrate/groups/%'] = array(
    'title callback' => 'migrate_ui_migrate_group_title',
    'title arguments' => array(
      4,
    ),
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'migrate_ui_migrate_group',
      4,
    ),
    'access arguments' => array(
      MIGRATE_ACCESS_BASIC,
    ),
    'file' => 'migrate_ui.pages.inc',
  );
  $items['admin/content/migrate/groups/%/%'] = array(
    'title callback' => 'migrate_ui_migrate_migration_title',
    'title arguments' => array(
      5,
    ),
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'migrate_migration_info',
      4,
      5,
    ),
    'access arguments' => array(
      MIGRATE_ACCESS_BASIC,
    ),
    'file' => 'migrate_ui.pages.inc',
  );
  $items['admin/content/migrate/groups/%/%/view'] = array(
    'title' => 'View',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/content/migrate/groups/%/%/edit'] = array(
    'type' => MENU_LOCAL_TASK,
    'title' => 'Edit',
    'description' => 'Edit migration mappings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'migrate_ui_edit_mappings',
      4,
      5,
    ),
    'access arguments' => array(
      MIGRATE_ACCESS_ADVANCED,
    ),
    'file' => 'migrate_ui.pages.inc',
  );
  $items['admin/content/migrate/groups/%/%/messages'] = array(
    'type' => MENU_LOCAL_TASK,
    'title' => 'Messages',
    'description' => 'View messages from a migration',
    'page callback' => 'migrate_ui_messages',
    'page arguments' => array(
      4,
      5,
    ),
    'access arguments' => array(
      MIGRATE_ACCESS_ADVANCED,
    ),
    'file' => 'migrate_ui.pages.inc',
  );
  return $items;
}