5 * Test module for the entity API providing several extra fields for testing.
8 use Drupal\Core\Entity\EntityTypeInterface;
11 * Implements hook_entity_base_field_info().
13 function entity_test_extra_entity_base_field_info(EntityTypeInterface $entity_type) {
14 return \Drupal::state()->get($entity_type->id() . '.additional_base_field_definitions', []);
18 * Implements hook_entity_field_storage_info().
20 function entity_test_extra_entity_field_storage_info(EntityTypeInterface $entity_type) {
21 return \Drupal::state()->get($entity_type->id() . '.additional_field_storage_definitions', []);
25 * Implements hook_entity_bundle_field_info().
27 function entity_test_extra_entity_bundle_field_info(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) {
28 return \Drupal::state()->get($entity_type->id() . '.' . $bundle . '.additional_bundle_field_definitions', []);