function MenuLinksetRoutes::onConfigSave

Same name in other branches
  1. 11.x core/modules/system/src/Routing/MenuLinksetRoutes.php \Drupal\system\Routing\MenuLinksetRoutes::onConfigSave()

File

core/modules/system/src/Routing/MenuLinksetRoutes.php, line 60

Class

MenuLinksetRoutes
Dynamically defines routes for menu linkset endpoints.

Namespace

Drupal\system\Routing

Code

public function onConfigSave(ConfigCrudEvent $event) {
    $saved_config = $event->getConfig();
    if ($saved_config->getName() === 'system.feature_flags' && $event->isChanged('linkset_endpoint')) {
        $this->routeBuilder
            ->setRebuildNeeded();
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.