You are here

function PartyB2BOrganizationPartyMigration::complete in Party 7

Same name and namespace in other branches
  1. 8.2 starterkits/party_starterkit_b2b/party_starterkit_b2b_migrate/party_starterkit_b2b_migrate_organizations.inc \PartyB2BOrganizationPartyMigration::complete()

Attach profile2 from PartyOrganizationProfile2Migration

File

starterkits/party_starterkit_b2b/party_starterkit_b2b_migrate/party_starterkit_b2b_migrate_organizations.inc, line 160
Support for migrate module

Class

PartyB2BOrganizationPartyMigration
Dependant migration that creates Party's from Profile2's.

Code

function complete($party, $row) {

  // Set the contact hat.
  $hat = party_hat_load('org');
  party_hat_hats_assign($party, array(
    $hat,
  ));
  $profile2 = profile2_load($party->profile2_id);
  party_attach_entity($party, $profile2, 'profile2_party_org');
}