function party_attach_entity in Party 8.2
Same name and namespace in other branches
- 7 party.module \party_attach_entity()
Attach an entity to a party according to a given data set.
Parameters
$party: The party to assign the entity to.
$entity: The entity to relate to.
$data_set: The name of the data set. DX WTF: can we sniff this out given the entity type and the entity object? DX WTF: Lots of sniffing now done BUT do we want the $data_set instance made elsewhere. If so where?
4 calls to party_attach_entity()
- PartyB2BContactPartyMigration::complete in starterkits/
party_starterkit_b2b/ party_starterkit_b2b_migrate/ party_starterkit_b2b_migrate_contacts.inc - Attach profile2 from PartyOrganizationProfile2Migration
- PartyB2BOrganizationPartyMigration::complete in starterkits/
party_starterkit_b2b/ party_starterkit_b2b_migrate/ party_starterkit_b2b_migrate_organizations.inc - Attach profile2 from PartyOrganizationProfile2Migration
- party_devel_generate_party_add_party in modules/
party_devel/ devel_generate.inc - Create one party. Used by both batch and non-batch code branches.
- party_rules_attach_entity in ./
party.rules.inc - Implement the attach entity rule.
File
- ./
party.module, line 918 - Provides a generic CRM party entity.
Code
function party_attach_entity($party, $entity, $data_set_name) {
$data_set_controller = party_get_crm_controller($party, $data_set_name);
$data_set_controller
->attachEntity($entity);
$data_set_controller
->save();
}