function field_test_entity_type_alter

Same name and namespace in other branches
  1. 9 core/modules/field/tests/modules/field_test/field_test.entity.inc \field_test_entity_type_alter()
  2. 8.9.x core/modules/field/tests/modules/field_test/field_test.entity.inc \field_test_entity_type_alter()
  3. 10 core/modules/field/tests/modules/field_test/field_test.entity.inc \field_test_entity_type_alter()

Implements hook_entity_type_alter().

File

core/modules/field/tests/modules/field_test/field_test.entity.inc, line 11

Code

function field_test_entity_type_alter(array &$entity_types) {
    
    /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */
    foreach (field_test_entity_info_translatable() as $entity_type => $translatable) {
        $entity_types[$entity_type]->set('translatable', $translatable);
    }
}

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