function jsonapi_entity_delete

Same name in other branches
  1. 9 core/modules/jsonapi/jsonapi.module \jsonapi_entity_delete()
  2. 10 core/modules/jsonapi/jsonapi.module \jsonapi_entity_delete()
  3. 11.x core/modules/jsonapi/jsonapi.module \jsonapi_entity_delete()

Implements hook_entity_delete().

File

core/modules/jsonapi/jsonapi.module, line 155

Code

function jsonapi_entity_delete(EntityInterface $entity) {
    if (in_array($entity->getEntityTypeId(), [
        'field_storage_config',
        'field_config',
    ])) {
        // @todo: only do this when relationship fields are updated, not just any field.
        JsonApiRoutes::rebuild();
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.