public function MigrateDestinationUserpoints::prepare in User Points 7
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.
File
- ./
userpoints.migrate.inc, line 149 - Migration class for userpoint transactions.
Class
- MigrateDestinationUserpoints
- Destination class for migrating userpoints.
Code
public function prepare(stdClass $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);
}
}