You are here

public function Migration::addUnmigratedSources in Migrate 7.2

Same name and namespace in other branches
  1. 6.2 includes/migration.inc \Migration::addUnmigratedSources()

Shortcut for adding several source fields which are to be explicitly not migrated.

Parameters

array $fields: List of fields to mark as not for migration.

string $issue_group: Issue group name to apply to the generated mappings (defaults to 'DNM').

2 calls to Migration::addUnmigratedSources()
BeerNodeMigration::__construct in migrate_example/beer.inc
General initialization of a Migration object.
WineWineMigration::__construct in migrate_example/wine.inc
General initialization of a Migration object.

File

includes/migration.inc, line 456
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 function addUnmigratedSources(array $fields, $issue_group = NULL, $warn_on_override = TRUE) {
  if (!$issue_group) {
    $issue_group = t('DNM');
  }
  foreach ($fields as $field) {
    $this
      ->addFieldMapping(NULL, $field, $warn_on_override)
      ->issueGroup($issue_group);
  }
}