You are here

public function AdvancedExampleMigration::__construct in Migrate 7.2

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

General initialization of a Migration object.

Overrides Migration::__construct

12 calls to AdvancedExampleMigration::__construct()
WineCommentMigration::__construct in migrate_example/wine.inc
General initialization of a Migration object.
WineCommentUpdatesMigration::__construct in migrate_example/wine.inc
General initialization of a Migration object.
WineFileBlobMigration::__construct in migrate_example/wine.inc
General initialization of a Migration object.
WineFileCopyMigration::__construct in migrate_example/wine.inc
General initialization of a Migration object.
WineProducerMigration::__construct in migrate_example/wine.inc
General initialization of a Migration object.

... See full list

12 methods override AdvancedExampleMigration::__construct()
WineCommentMigration::__construct in migrate_example/wine.inc
General initialization of a Migration object.
WineCommentUpdatesMigration::__construct in migrate_example/wine.inc
General initialization of a Migration object.
WineFileBlobMigration::__construct in migrate_example/wine.inc
General initialization of a Migration object.
WineFileCopyMigration::__construct in migrate_example/wine.inc
General initialization of a Migration object.
WineProducerMigration::__construct in migrate_example/wine.inc
General initialization of a Migration object.

... See full list

File

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

Class

AdvancedExampleMigration
Abstract intermediate class holding common settings.

Code

public function __construct($arguments) {
  parent::__construct($arguments);
  $this->team = array(
    new MigrateTeamMember('Jack Kramer', 'jkramer@example.com', t('Taster')),
    new MigrateTeamMember('Linda Madison', 'lmadison@example.com', t('Winemaker')),
  );
  $this->issuePattern = 'http://drupal.org/node/:id:';

  // A format of our own, for testing migration of formats
  $this->basicFormat = filter_format_load('migrate_example');

  // We can do shared field mappings in the common class
  if (module_exists('path')) {
    $this
      ->addFieldMapping('path')
      ->issueGroup(t('DNM'));
    if (module_exists('pathauto')) {
      $this
        ->addFieldMapping('pathauto')
        ->issueGroup(t('DNM'));
    }
  }
}