You are here

function commerce_addressbook_enabled_entities in Commerce Addressbook 7

Get a simple list of enabled entities, based on the definitions provided by commerce_addressbook_enabled_entities_info()

Return value

array: a list of entity names that work with the Commerce Addressbook module

2 calls to commerce_addressbook_enabled_entities()
commerce_addressbook_field_attach_form in ./commerce_addressbook.module
Implements hook_field_attach_form().
commerce_addressbook_get_bundles_with_field in ./commerce_addressbook.module
Helper function to get a list of bundles (grouped by entity type) that contain a certain field type, and each of the fields that are attached to them

File

./commerce_addressbook.module, line 557
:

Code

function commerce_addressbook_enabled_entities() {
  $entities = array();
  $info = commerce_addressbook_enabled_entities_info();
  if ($info) {
    foreach ($info as $key => $entity_definition) {
      $entities[] = $entity_definition['entity_type'];
    }
  }
  return $entities;
}