Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / system / tests / modules / entity_test_extra / entity_test_extra.module
1 <?php
2
3 /**
4  * @file
5  * Test module for the entity API providing several extra fields for testing.
6  */
7
8 use Drupal\Core\Entity\EntityTypeInterface;
9
10 /**
11  * Implements hook_entity_base_field_info().
12  */
13 function entity_test_extra_entity_base_field_info(EntityTypeInterface $entity_type) {
14   return \Drupal::state()->get($entity_type->id() . '.additional_base_field_definitions', []);
15 }
16
17 /**
18  * Implements hook_entity_field_storage_info().
19  */
20 function entity_test_extra_entity_field_storage_info(EntityTypeInterface $entity_type) {
21   return \Drupal::state()->get($entity_type->id() . '.additional_field_storage_definitions', []);
22 }
23
24 /**
25  * Implements hook_entity_bundle_field_info().
26  */
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', []);
29 }