You are here

function config_test_rest_entity_type_alter in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/rest/tests/modules/config_test_rest/config_test_rest.module \config_test_rest_entity_type_alter()

Implements hook_entity_type_alter().

File

core/modules/rest/tests/modules/config_test_rest/config_test_rest.module, line 16
Contains hook implementations for testing REST module.

Code

function config_test_rest_entity_type_alter(array &$entity_types) {

  // Undo part of what config_test_entity_type_alter() did: remove this
  // config_test_no_status entity type, because it uses the same entity class as
  // the config_test entity type, which makes REST deserialization impossible.
  unset($entity_types['config_test_no_status']);
}