Skip to content

NavigationCreateLinksSubscriber

Rebuilds the menu links when the navigation_create_links helper changes.


  • Full name: \Drupal\helper\EventSubscriber\NavigationCreateLinksSubscriber
  • This class implements: EventSubscriberInterface

See Also:

  • \Drupal\helper\Hook\NavigationHooks::menuLinksDiscoveredAlter()

Properties

routeBuilder

protected \Drupal\Core\Routing\RouteBuilderInterface $routeBuilder

Methods

__construct

NavigationCreateLinksSubscriber constructor.

public __construct(\Drupal\Core\Routing\RouteBuilderInterface $routeBuilder): mixed

Parameters:

Parameter Type Description
$routeBuilder \Drupal\Core\Routing\RouteBuilderInterface

onConfigSave

Flags the router, and with it the menu links, for a rebuild.

public onConfigSave(\Drupal\Core\Config\ConfigCrudEvent $event): void

Parameters:

Parameter Type Description
$event \Drupal\Core\Config\ConfigCrudEvent

getSubscribedEvents

{@inheritdoc}

public static getSubscribedEvents(): array
  • This method is static.