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

Breadcrumb

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

function NodeAdminRouteSubscriber::onConfigSave

Rebuilds the router when node.settings:use_admin_theme is changed.

Parameters

\Drupal\Core\Config\ConfigCrudEvent $event: The event object.

File

core/modules/node/src/EventSubscriber/NodeAdminRouteSubscriber.php, line 63

Class

NodeAdminRouteSubscriber
Sets the _admin_route for specific node-related routes.

Namespace

Drupal\node\EventSubscriber

Code

public function onConfigSave(ConfigCrudEvent $event) {
    if ($event->getConfig()
        ->getName() === 'node.settings' && $event->isChanged('use_admin_theme')) {
        $this->routerBuilder
            ->setRebuildNeeded();
    }
}

API Navigation

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