function NodeAdminRouteSubscriber::onConfigSave
Same name in other branches
- 9 core/modules/node/src/EventSubscriber/NodeAdminRouteSubscriber.php \Drupal\node\EventSubscriber\NodeAdminRouteSubscriber::onConfigSave()
- 8.9.x core/modules/node/src/EventSubscriber/NodeAdminRouteSubscriber.php \Drupal\node\EventSubscriber\NodeAdminRouteSubscriber::onConfigSave()
- 10 core/modules/node/src/EventSubscriber/NodeAdminRouteSubscriber.php \Drupal\node\EventSubscriber\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\EventSubscriberCode
public function onConfigSave(ConfigCrudEvent $event) {
if ($event->getConfig()
->getName() === 'node.settings' && $event->isChanged('use_admin_theme')) {
$this->routerBuilder
->setRebuildNeeded();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.