function field_test_entity_type_alter

Same name in other branches
  1. 9 core/modules/field/tests/modules/field_test/field_test.entity.inc \field_test_entity_type_alter()
  2. 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 $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
    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.