function entity_test_entity_info_alter

Implements hook_entity_info_alter().

File

drupal/core/modules/system/tests/modules/entity_test/entity_test.module, line 58
Test module for the entity API providing several entity types for testing.

Code

function entity_test_entity_info_alter(&$info) {

  // Optionally specify a translation handler for testing translations.
  if (Drupal::state()
    ->get('entity_test.translation')) {
    foreach (entity_test_entity_types() as $entity_type) {
      $info[$entity_type]['translation'][$entity_type] = TRUE;
    }
  }
}