You are here

function civicrm_entity_schema_alter in CiviCRM Entity 7

Same name and namespace in other branches
  1. 7.2 civicrm_entity.module \civicrm_entity_schema_alter()

Implements hook_schema_alter().

Note we are just doing this in a very simple form relationship type which is not defined by views at this stage. We have the problem that the CiviCRM views integration uses the _data hook & would need to use _data_alter hook to be compatible with entity views integration

Parameters

$schema:

File

./civicrm_entity.module, line 84
Implement CiviCRM entities as a Drupal Entity.

Code

function civicrm_entity_schema_alter(&$schema) {
  $schema_entities = _civicrm_entity_enabled_entities();
  foreach ($schema_entities as $drupal_entity => $civicrm_entity) {
    $schema[$drupal_entity] = civicrm_entity_get_schema($drupal_entity);
  }
}