public function JsonRenderer::__construct in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/common_test/src/Render/MainContent/JsonRenderer.php \Drupal\common_test\Render\MainContent\JsonRenderer::__construct()
Constructs a new JsonRenderer.
Parameters
\Drupal\Core\Controller\TitleResolverInterface $title_resolver: The title resolver.
\Drupal\Core\Render\RendererInterface $renderer: The renderer service.
File
- core/
modules/ system/ tests/ modules/ common_test/ src/ Render/ MainContent/ JsonRenderer.php, line 40
Class
- JsonRenderer
- Default main content renderer for JSON requests.
Namespace
Drupal\common_test\Render\MainContentCode
public function __construct(TitleResolverInterface $title_resolver, RendererInterface $renderer) {
$this->titleResolver = $title_resolver;
$this->renderer = $renderer;
}