function EntityTestUpdateHooks::entityFieldStorageInfo

Implements hook_entity_field_storage_info().

Attributes

#[Hook('entity_field_storage_info')]

File

core/modules/system/tests/modules/entity_test_update/src/Hook/EntityTestUpdateHooks.php, line 36

Class

EntityTestUpdateHooks
Hook implementations for entity_test_update.

Namespace

Drupal\entity_test_update\Hook

Code

public function entityFieldStorageInfo(EntityTypeInterface $entity_type) : array {
  if ($entity_type->id() == 'entity_test_update') {
    return \Drupal::state()->get('entity_test_update.additional_field_storage_definitions', []);
  }
  return [];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.