You are here

public function JsonRenderer::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 45
Contains \Drupal\common_test\Render\MainContent\JsonRenderer.

Class

JsonRenderer
Default main content renderer for JSON requests.

Namespace

Drupal\common_test\Render\MainContent

Code

public function __construct(TitleResolverInterface $title_resolver, RendererInterface $renderer) {
  $this->titleResolver = $title_resolver;
  $this->renderer = $renderer;
}