class BatchNegotiator implements ThemeNegotiatorInterface (View source)

Sets the active theme for the batch page.

Properties

protected BatchStorageInterface $batchStorage

The batch storage.

protected RequestStack $requestStack

The request stack.

Methods

__construct(BatchStorageInterface $batch_storage, RequestStack $request_stack)

Constructs a BatchNegotiator.

bool
applies(RouteMatchInterface $route_match)

Whether this theme negotiator should be used to set the theme.

string|null
determineActiveTheme(RouteMatchInterface $route_match)

Determine the active theme for the request.

Details

__construct(BatchStorageInterface $batch_storage, RequestStack $request_stack)

Constructs a BatchNegotiator.

Parameters

BatchStorageInterface $batch_storage

The batch storage.

RequestStack $request_stack

The request stack used to retrieve the current request.

bool applies(RouteMatchInterface $route_match)

Whether this theme negotiator should be used to set the theme.

Parameters

RouteMatchInterface $route_match

The current route match object.

Return Value

bool

TRUE if this negotiator should be used or FALSE to let other negotiators decide.

string|null determineActiveTheme(RouteMatchInterface $route_match)

Determine the active theme for the request.

Parameters

RouteMatchInterface $route_match

The current route match object.

Return Value

string|null

The name of the theme, or NULL if other negotiators, like the configured default one, should be used instead.