interface TitleResolverInterface (View source)

Defines a class which knows how to generate the title from a given route.

Methods

array|string|null
getTitle(Request $request, Route $route)

Returns a static or dynamic title for the route.

Details

array|string|null getTitle(Request $request, Route $route)

Returns a static or dynamic title for the route.

If the returned title can contain HTML that should not be escaped it should return a render array, for example:

Parameters

Request $request

The request object passed to the title callback.

Route $route

The route information of the route to fetch the title.

Return Value

array|string|null

The title for the route.