You are here

public function WineFinishMigration::import in Migrate 7.2

Same name and namespace in other branches
  1. 6.2 migrate_example/wine.inc \WineFinishMigration::import()

File

migrate_example/wine.inc, line 1558
Advanced migration examples. These serve two purposes:

Class

WineFinishMigration
This migration works with WinePrepMigration to make sure auto_nodetitle is re-enabled if we disabled it.

Code

public function import() {
  if (!module_exists('auto_nodetitle')) {
    if (WinePrepMigration::$wasEnabled) {
      module_enable(array(
        'auto_nodetitle',
      ));
      self::displayMessage(t('Re-enabled auto_nodetitle module'), 'success');
    }
    else {
      self::displayMessage(t('auto_nodetitle was not originally enabled'), 'success');
    }
  }
  else {
    self::displayMessage(t('Auto_nodetitle module already enabled'), 'success');
  }
  return Migration::RESULT_COMPLETED;
}