public function Migration::addSimpleMappings in Migrate 7.2
Same name and namespace in other branches
- 6.2 includes/migration.inc \Migration::addSimpleMappings()
Shortcut for adding several fields which have the same name on both source and destination sides.
Parameters
array $fields: List of field names to map.
4 calls to Migration::addSimpleMappings()
- BeerCommentMigration::__construct in migrate_example/
beer.inc - General initialization of a Migration object.
- BeerUserMigration::__construct in migrate_example/
beer.inc - General initialization of a Migration object.
- WineCommentMigration::__construct in migrate_example/
wine.inc - General initialization of a Migration object.
- WineUserMigration::__construct in migrate_example/
wine.inc - General initialization of a Migration object.
File
- includes/
migration.inc, line 420 - 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 addSimpleMappings(array $fields) {
foreach ($fields as $field) {
$this
->addFieldMapping($field, $field);
}
}