You are here

function civicrm_entity_update_7202 in CiviCRM Entity 7.2

Create enabled entities variable

File

./civicrm_entity.install, line 51
Installation/Un-installation hooks for CiviCRM Entity.

Code

function civicrm_entity_update_7202() {
  drupal_load('module', 'civicrm_entity');
  $available_entities = _civicrm_entity_available_entities();
  $settings = [];
  foreach ($available_entities as $drupal_entity_type => $civicrm_api_entity) {
    $settings[$drupal_entity_type] = $drupal_entity_type;
  }
  variable_set('civicrm_entity_admin_enabled_entities', $settings);
}