You are here

function _civicrm_entity_available_entities in CiviCRM Entity 7.2

We gather a list entities that are available, either as hardcoded in this module, or provided by the hook

3 calls to _civicrm_entity_available_entities()
civicrm_entity_admin_settings_form in ./civicrm_entity.admin_form.inc
Settings form callback function
civicrm_entity_update_7202 in ./civicrm_entity.install
Create enabled entities variable
_civicrm_entity_enabled_entities in ./civicrm_entity.module
Whitelist of enabled entities. We don't have a compelling reason for not including all entities but some entities are fairly non-standard and of course the rule hook would instantiate rules more often if all were enabled.

File

./civicrm_entity.module, line 2004

Code

function _civicrm_entity_available_entities() {
  $civicrm_entity_info = civicrm_entity_get_supported_entity_info();
  $whitelist = array();
  foreach ($civicrm_entity_info as $drupal_entity => $data) {
    if (isset($data['civicrm entity name'])) {
      $whitelist[$drupal_entity] = $data['civicrm entity name'];
    }
  }
  _civicrm_enabled_entity_alter_whitelist($whitelist);
  return $whitelist;
}