interface TitleResolverInterface in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Controller/TitleResolverInterface.php \Drupal\Core\Controller\TitleResolverInterface
Defines a class which knows how to generate the title from a given route.
Hierarchy
- interface \Drupal\Core\Controller\TitleResolverInterface
Expanded class hierarchy of TitleResolverInterface
All classes that implement TitleResolverInterface
4 files declare their use of TitleResolverInterface
- DialogRenderer.php in core/
lib/ Drupal/ Core/ Render/ MainContent/ DialogRenderer.php - Contains \Drupal\Core\Render\MainContent\DialogRenderer.
- HtmlRenderer.php in core/
lib/ Drupal/ Core/ Render/ MainContent/ HtmlRenderer.php - Contains \Drupal\Core\Render\MainContent\HtmlRenderer.
- JsonRenderer.php in core/
modules/ system/ tests/ modules/ common_test/ src/ Render/ MainContent/ JsonRenderer.php - Contains \Drupal\common_test\Render\MainContent\JsonRenderer.
- PathBasedBreadcrumbBuilder.php in core/
modules/ system/ src/ PathBasedBreadcrumbBuilder.php - Contains \Drupal\system\PathBasedBreadcrumbBuilder.
File
- core/
lib/ Drupal/ Core/ Controller/ TitleResolverInterface.php, line 15 - Contains \Drupal\Core\Controller\TitleResolverInterface.
Namespace
Drupal\Core\ControllerView source
interface TitleResolverInterface {
/**
* 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:
* @code
* ['#markup' => 'title', '#allowed_tags' => ['em']]
* @endcode
* If the method returns a string and it is not marked safe then it will be
* auto-escaped.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* The request object passed to the title callback.
* @param \Symfony\Component\Routing\Route $route
* The route information of the route to fetch the title.
*
* @return array|string|null
* The title for the route.
*/
public function getTitle(Request $request, Route $route);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TitleResolverInterface:: |
public | function | Returns a static or dynamic title for the route. | 1 |