You are here

public function MigrateDestinationOGMembership::complete in Organic groups 7.2

Give handlers a shot at modifying the object (or taking additional action) after saving it.

Parameters

$entity: OGMembership object to build. This is the complete object after saving.

$source_row: Raw source data object - passed through to complete handlers.

1 call to MigrateDestinationOGMembership::complete()
MigrateDestinationOGMembership::import in includes/migrate/plugins/destinations/og_membership.inc
Import a single membership.

File

includes/migrate/plugins/destinations/og_membership.inc, line 150
Import Organic group memberships.

Class

MigrateDestinationOGMembership
Destination class implementing migration into an OG Audience field.

Code

public function complete($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', 'complete', $entity, $row);

  // Then call any complete handler for this specific Migration.
  if (method_exists($migration, 'complete')) {
    $migration
      ->complete($entity, $row);
  }
}