function jsonapi_entity_delete in JSON:API 8.2
Implements hook_entity_delete().
File
- ./
jsonapi.module, line 171 - Module implementation file.
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();
}
}