function entity_test_entity_info_alter

Implements hook_entity_info_alter().

File

drupal/core/modules/system/tests/modules/entity_test/entity_test.module, line 14
Test module for the entity API providing an entity type for testing.

Code

function entity_test_entity_info_alter(&$info) {

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

  // Optionally unset the access controller to test the fallback.
  if (state()
    ->get('entity_test.default_access_controller')) {
    unset($info['entity_test']['access_controller_class']);
  }
}