public TitleResolverInterface::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:
['#markup' => 'title', '#allowed_tags' => ['em']]
If the method returns a string and it is not marked safe then it will be auto-escaped.
\Symfony\Component\HttpFoundation\Request $request: The request object passed to the title callback.
\Symfony\Component\Routing\Route $route: The route information of the route to fetch the title.
array|string|null The title for the route.
public function getTitle(Request $request, Route $route);
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Controller!TitleResolverInterface.php/function/TitleResolverInterface::getTitle/8.1.x