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

Breadcrumb

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

function Routes::rebuild

Invalidates any JSON:API resource type dependent responses and routes.

4 calls to Routes::rebuild()
JsonapiHooks::entityBundleCreate in core/modules/jsonapi/src/Hook/JsonapiHooks.php
Implements hook_entity_bundle_create().
JsonapiHooks::entityBundleDelete in core/modules/jsonapi/src/Hook/JsonapiHooks.php
Implements hook_entity_bundle_delete().
JsonapiHooks::entityCreate in core/modules/jsonapi/src/Hook/JsonapiHooks.php
Implements hook_entity_create().
JsonapiHooks::entityDelete in core/modules/jsonapi/src/Hook/JsonapiHooks.php
Implements hook_entity_delete().

File

core/modules/jsonapi/src/Routing/Routes.php, line 476

Class

Routes
Defines dynamic routes.

Namespace

Drupal\jsonapi\Routing

Code

public static function rebuild() {
    \Drupal::service('cache_tags.invalidator')->invalidateTags([
        'jsonapi_resource_types',
    ]);
    \Drupal::service('router.builder')->setRebuildNeeded();
}
RSS feed
Powered by Drupal