You are here

function party_entity_info_alter in Party 7

Same name and namespace in other branches
  1. 8.2 party.module \party_entity_info_alter()

Implements hook_entity_info_alter().

Make standard alterations to entities that declare they work with Parties via hook_party_data_set_info().

See also

PartyDefaultDataSet::hook_entity_info_alter()

File

./party.module, line 88
Provides a generic CRM party entity.

Code

function party_entity_info_alter(&$entity_info) {
  $sets = party_get_data_set_info();
  foreach ($sets as $set) {
    $entity_info[$set['entity type']]['crm controller class'] = $set['class'];

    // Pass this onto the class to make changes.
    call_user_func_array(array(
      $set['class'],
      'hook_entity_info_alter',
    ), array(
      &$entity_info[$set['entity type']],
    ));
  }
}