interface TitleResolverInterface
Same name in other branches
- 9 core/lib/Drupal/Core/Controller/TitleResolverInterface.php \Drupal\Core\Controller\TitleResolverInterface
- 10 core/lib/Drupal/Core/Controller/TitleResolverInterface.php \Drupal\Core\Controller\TitleResolverInterface
- 11.x 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
7 files declare their use of TitleResolverInterface
- DialogRenderer.php in core/
lib/ Drupal/ Core/ Render/ MainContent/ DialogRenderer.php - DialogRendererTest.php in core/
tests/ Drupal/ Tests/ Core/ Controller/ DialogRendererTest.php - HtmlRenderer.php in core/
lib/ Drupal/ Core/ Render/ MainContent/ HtmlRenderer.php - JsonRenderer.php in core/
modules/ system/ tests/ modules/ common_test/ src/ Render/ MainContent/ JsonRenderer.php - OffCanvasRenderer.php in core/
lib/ Drupal/ Core/ Render/ MainContent/ OffCanvasRenderer.php
File
-
core/
lib/ Drupal/ Core/ Controller/ TitleResolverInterface.php, line 11
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
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
TitleResolverInterface::getTitle | public | function | Returns a static or dynamic title for the route. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.