You are here

function commerce_wishlist_entity_bundle_info in Commerce Wishlist 8.3

Implements hook_entity_bundle_info().

File

./commerce_wishlist.module, line 338
Defines the Wishlist entity and associated features.

Code

function commerce_wishlist_entity_bundle_info() {
  $purchasable_entity_types = commerce_wishlist_get_purchasable_entity_types();
  $bundles = [];
  foreach ($purchasable_entity_types as $entity_type_id => $entity_type) {
    $bundles['commerce_wishlist_item'][$entity_type_id] = [
      'label' => $entity_type
        ->getLabel(),
      'translatable' => FALSE,
      'provider' => 'commerce_wishlist',
    ];
  }
  return $bundles;
}