function jsonapi_entity_create
Same name in other branches
- 9 core/modules/jsonapi/jsonapi.module \jsonapi_entity_create()
- 8.9.x core/modules/jsonapi/jsonapi.module \jsonapi_entity_create()
Implements hook_entity_create().
File
-
core/
modules/ jsonapi/ jsonapi.module, line 145
Code
function jsonapi_entity_create(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.