1 field_test.entity.inc field_test_entity_info_alter(&$entity_info)

Implements hook_entity_info_alter().

File

core/modules/field/tests/field_test/field_test.entity.inc, line 128
Defines an entity type.

Code

function field_test_entity_info_alter(&$entity_info) {
  // Enable/disable field_test as a translation handler.
  foreach (field_test_entity_info_translatable() as $entity_type => $translatable) {
    $entity_info[$entity_type]['translation']['field_test'] = $translatable;
  }
  // Disable locale as a translation handler.
  foreach ($entity_info as $entity_type => $info) {
    $entity_info[$entity_type]['translation']['locale'] = FALSE;
  }
}