public static function Migration::registerMigration in Migrate 7.2
Register a new migration process in the migrate_status table. This will generally be used in two contexts - by the class detection code for static (one instance per class) migrations, and by the module implementing dynamic (parameterized class) migrations.
Parameters
string $class_name:
string $machine_name:
array $arguments:
Overrides MigrationBase::registerMigration
4 calls to Migration::registerMigration()
- MigrateUIWizard::formSaveSettings in migrate_ui/
migrate_ui.wizard.inc - Take the information we've accumulated throughout the wizard, and create the Migrations to perform the import.
- migrate_example_baseball_enable in migrate_example_baseball/
migrate_example_baseball.install - @file Set up the migration baseball example module.
- migrate_static_registration in ./
migrate.module - Register any migrations defined in hook_migrate_api().
- migrate_ui_edit_mappings_submit in migrate_ui/
migrate_ui.pages.inc - Submit callback for the edit mappings form. Save any choices made in the UI which override mappings made in code.
File
- includes/
migration.inc, line 264 - Defines the base class for import/rollback processes.
Class
- Migration
- The base class for all import objects. This is where most of the smarts of the migrate module resides. Migrations are created by deriving from this class, and in the constructor (after calling parent::__construct()) initializing at a minimum the name,…
Code
public static function registerMigration($class_name, $machine_name = NULL, array $arguments = array()) {
// Record any field mappings provided via arguments.
if (isset($arguments['field_mappings'])) {
self::saveFieldMappings($machine_name, $arguments['field_mappings']);
unset($arguments['field_mappings']);
}
parent::registerMigration($class_name, $machine_name, $arguments);
}