public function NodeAdminRouteSubscriber::onConfigSave in Drupal 8
Same name and namespace in other branches
- 9 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:
File
- core/
modules/ node/ src/ EventSubscriber/ NodeAdminRouteSubscriber.php, line 62
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();
}
}