Issue #1996736 by Dave Reid: Add support for hook_migrate_api_alter()
[project/migrate.git] / migrate.api.php
1 <?php
2
3 /**
4 * @file
5 * Documentation for hooks defined by Migrate.
6 */
7
8 /**
9 * Registers your module as an implementor of Migrate-based classes.
10 */
11 function hook_migrate_api() {
12 $api = array(
13 'api' => 2,
14 'migrations' => array(
15 'HookExample' => array('class_name' => 'HookExampleMigration'),
16 ),
17 );
18 return $api;
19 }
20
21 /**
22 * Alter information from all implementations of hook_migrate_api().
23 *
24 * @param array $info
25 * An array of results from hook_migrate_api(), keyed by module name.
26 */
27 function hook_migrate_api_alter(array &$info) {
28 if (isset($info['MODULE_NAME']['migrations']['HookExample'])) {
29 $info['MODULE_NAME']['migrations']['HookExample']['class_name'] = 'MyBetterHookMigration';
30 }
31 }
32
33 /**
34 * Provides text to be displayed at the top of the dashboard page (migrate_ui).
35 */
36 function hook_migrate_overview() {
37 return t('<p>Listed below are all the migration processes defined for migration
38 of our old site to Drupal. Open issues applying to specific migrations
39 can be viewed by clicking the migration name. Also, details on how each
40 migration will behave when incrementally migrated are provided.</p>
41 <p><a href="http://issuetracker.example.com/?project=migration&status=open">Open migration tickets</a></p>');
42 }