function JsonRenderer::__construct
Same name in other branches
- 9 core/modules/system/tests/modules/common_test/src/Render/MainContent/JsonRenderer.php \Drupal\common_test\Render\MainContent\JsonRenderer::__construct()
- 8.9.x core/modules/system/tests/modules/common_test/src/Render/MainContent/JsonRenderer.php \Drupal\common_test\Render\MainContent\JsonRenderer::__construct()
- 10 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 42
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.