public function MigrateDestinationOGMembership::prepare in Organic groups 7.2
Give handlers a shot at modifying the object before saving it.
Parameters
$entity: OGMembership object to build. Prefilled with any fields mapped in the Migration.
$source_row: Raw source data object - passed through to prepare handlers.
1 call to MigrateDestinationOGMembership::prepare()
- MigrateDestinationOGMembership::import in includes/
migrate/ plugins/ destinations/ og_membership.inc - Import a single membership.
File
- includes/
migrate/ plugins/ destinations/ og_membership.inc, line 125 - Import Organic group memberships.
Class
- MigrateDestinationOGMembership
- Destination class implementing migration into an OG Audience field.
Code
public function prepare($entity, stdClass $row) {
// We do nothing here but allow child classes to act.
$migration = Migration::currentMigration();
$entity->migrate = array(
'machineName' => $migration
->getMachineName(),
);
// Call any general handlers.
migrate_handler_invoke_all('og_membership', 'prepare', $entity, $row);
// Then call any prepare handler for this specific Migration.
if (method_exists($migration, 'prepare')) {
$migration
->prepare($entity, $row);
}
}