public function MigrateDestinationTable::prepare in Migrate 7.2
Same name and namespace in other branches
- 6.2 plugins/destinations/table.inc \MigrateDestinationTable::prepare()
Give handlers a shot at modifying the object before saving it.
Parameters
$entity: Entity object to build. Prefilled with any fields mapped in the Migration.
$source_row: Raw source data object - passed through to prepare handlers.
2 calls to MigrateDestinationTable::prepare()
- MigrateDestinationRole::import in plugins/
destinations/ user.inc - Import a single row.
- MigrateDestinationTable::import in plugins/
destinations/ table.inc - Import a single row.
File
- plugins/
destinations/ table.inc, line 185 - Support for tables defined through the Schema API.
Class
- MigrateDestinationTable
- Destination class implementing migration into a single table defined through the Schema API.
Code
public function prepare($entity, stdClass $source_row) {
$migration = Migration::currentMigration();
$entity->migrate = array(
'machineName' => $migration
->getMachineName(),
);
// Call any prepare handler for this specific Migration.
if (method_exists($migration, 'prepare')) {
$migration
->prepare($entity, $source_row);
}
}