123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- /**
- * @file
- * This is the file description for Migrate Materio module.
- *
- * In this more verbose, multi-line description, you can specify what this
- * file does exactly. Make sure to wrap your documentation in column 78 so
- * that the file can be displayed nicely in default-sized consoles.
- */
- define('MIG_MAT_SRC_DB', variable_get('migrate_materio_database', ''));
- define('MIG_MAT_SRC_DB_D6', variable_get('migrate_materio_database_drupal6', ''));
- /**
- * You must implement hook_migrate_api(), setting the API level to 2, for
- * your migration classes to be recognized by the Migrate module (for the 7.x-2.x branch).
- */
- function migrate_materio_migrate_api() {
- $api = array(
- 'api' => 2,
- );
- return $api;
- }
- /**
- * Implements hook_menu().
- */
- function migrate_materio_menu() {
- $items = array();
- $items['admin/config/development/migrate_materio'] = array(
- 'title' => 'Materio Migration Settings',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('migrate_materio_settings'),
- 'access callback' => 'user_access',
- 'access arguments' => array('administer site configuration'),
- );
- return $items;
- }
- /**
- * Form to setting up the database name and migration file path for migration of data.
- */
- function migrate_materio_settings($form, &$form_state) {
- $form['migrate_materio_database'] = array(
- '#type' => 'textfield',
- '#title' => 'Database name',
- '#default_value' => variable_get('migrate_materio_database', ''),
- '#description' => t('Please enter the name of the database. Note that the database must be accessible by current website db user and must reside on the same db server.'),
- '#required' => TRUE,
- );
-
- $form['migrate_materio_database_drupal6'] = array(
- '#type' => 'textfield',
- '#title' => 'Drupal 6 Database name',
- '#default_value' => variable_get('migrate_materio_database_drupal6', ''),
- '#description' => t('Please enter the name of the drupal 6 database. Note that the database must be accessible by current website db user and must reside on the same db server.'),
- '#required' => TRUE,
- );
-
- // $form['redcat_migration_file_path'] = array(
- // '#type' => 'textfield',
- // '#title' => 'Migrated Files Path',
- // '#default_value' => variable_get('redcat_migration_file_path', '/Users/amodi/Sites/redcat.org/sites/redcat.org/files'),
- // '#description' => t('Please enter the full path to get to the home directory of the migrating site - the files will be found through the base'),
- // '#required' => TRUE,
- // );
-
- return system_settings_form($form);
- }
|