Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. JsonapiHooks.php

function JsonapiHooks::entityCreate

Implements hook_entity_create().

File

core/modules/jsonapi/src/Hook/JsonapiHooks.php, line 76

Class

JsonapiHooks
Hook implementations for jsonapi.

Namespace

Drupal\jsonapi\Hook

Code

public function entityCreate(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.
        Routes::rebuild();
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal