Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Controller/TitleResolverInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\Core\Controller; | |
4 | |
5 use Symfony\Component\Routing\Route; | |
6 use Symfony\Component\HttpFoundation\Request; | |
7 | |
8 /** | |
9 * Defines a class which knows how to generate the title from a given route. | |
10 */ | |
11 interface TitleResolverInterface { | |
12 | |
13 /** | |
14 * Returns a static or dynamic title for the route. | |
15 * | |
16 * If the returned title can contain HTML that should not be escaped it should | |
17 * return a render array, for example: | |
18 * @code | |
19 * ['#markup' => 'title', '#allowed_tags' => ['em']] | |
20 * @endcode | |
21 * If the method returns a string and it is not marked safe then it will be | |
22 * auto-escaped. | |
23 * | |
24 * @param \Symfony\Component\HttpFoundation\Request $request | |
25 * The request object passed to the title callback. | |
26 * @param \Symfony\Component\Routing\Route $route | |
27 * The route information of the route to fetch the title. | |
28 * | |
29 * @return array|string|null | |
30 * The title for the route. | |
31 */ | |
32 public function getTitle(Request $request, Route $route); | |
33 | |
34 } |