You are here

function entity_entity_field_storage_info in Entity API 8

Implements hook_entity_field_storage_info().

File

./entity.module, line 107
Provides expanded entity APIs.

Code

function entity_entity_field_storage_info(EntityTypeInterface $entity_type) {
  if ($entity_type
    ->hasHandlerClass('bundle_plugin')) {

    /** @var \Drupal\entity\BundlePlugin\BundlePluginHandler $bundle_handler */
    $bundle_handler = \Drupal::entityTypeManager()
      ->getHandler($entity_type
      ->id(), 'bundle_plugin');
    return $bundle_handler
      ->getFieldStorageDefinitions();
  }
}