class NodeAdminRouteSubscriber extends RouteSubscriberBase (View source)

Sets the _admin_route for specific node-related routes.

Properties

protected ConfigFactoryInterface $configFactory

The config factory.

protected RouteBuilderInterface $routerBuilder

The router builder.

Methods

alterRoutes(RouteCollection $collection)

Alters existing routes for a specific collection.

static 
getSubscribedEvents()

{@inheritdoc}

onAlterRoutes(RouteBuildEvent $event)

Delegates the route altering to self::alterRoutes().

__construct(ConfigFactoryInterface $config_factory, RouteBuilderInterface $router_builder)

Constructs a new NodeAdminRouteSubscriber.

onConfigSave(ConfigCrudEvent $event)

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

Details

protected alterRoutes(RouteCollection $collection)

Alters existing routes for a specific collection.

Parameters

RouteCollection $collection

The route collection for adding routes.

static getSubscribedEvents()

{@inheritdoc}

onAlterRoutes(RouteBuildEvent $event)

Delegates the route altering to self::alterRoutes().

Parameters

RouteBuildEvent $event

The route build event.

__construct(ConfigFactoryInterface $config_factory, RouteBuilderInterface $router_builder)

Constructs a new NodeAdminRouteSubscriber.

Parameters

ConfigFactoryInterface $config_factory

The config factory.

RouteBuilderInterface $router_builder

The router builder service.

onConfigSave(ConfigCrudEvent $event)

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

Parameters

ConfigCrudEvent $event