diff --git a/phone.info b/phone.info index 8495a27..f398135 100644 --- a/phone.info +++ b/phone.info @@ -2,6 +2,7 @@ name = Phone description = The phone module allows administrators to define a field type for phone numbers. package = Fields dependencies[] = field +files[] = phone.migrate.inc files[] = tests/phone.au.test files[] = tests/phone.be.test files[] = tests/phone.br.test diff --git a/phone.migrate.inc b/phone.migrate.inc index 775da4e..2523ce0 100644 --- a/phone.migrate.inc +++ b/phone.migrate.inc @@ -20,3 +20,21 @@ function phone_field_alter(&$field_value, $instance_value) { $field_value['settings']['country'] = $code; } } + +/** + * Implements hook_migrate_api(). + */ +function phone_migrate_api() { + return array('api' => 2); +} + +/** + * Wrap Migrate's simple field handler for 'phone' fields. + */ +class MigratePhoneFieldHandler extends MigrateSimpleFieldHandler { + + public function __construct() { + $this->registerTypes(array('phone')); + } + +}