You are here

public function DialogRenderer::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Render/MainContent/DialogRenderer.php \Drupal\Core\Render\MainContent\DialogRenderer::__construct()

Constructs a new DialogRenderer.

Parameters

\Drupal\Core\Controller\TitleResolverInterface $title_resolver: The title resolver.

\Drupal\Core\Render\RendererInterface $renderer: The renderer.

2 calls to DialogRenderer::__construct()
OffCanvasRenderer::__construct in core/lib/Drupal/Core/Render/MainContent/OffCanvasRenderer.php
Constructs a new OffCanvasRenderer.
WideModalRenderer::__construct in core/modules/system/tests/modules/dialog_renderer_test/src/Render/MainContent/WideModalRenderer.php
Constructs a new WideModalRenderer.
2 methods override DialogRenderer::__construct()
OffCanvasRenderer::__construct in core/lib/Drupal/Core/Render/MainContent/OffCanvasRenderer.php
Constructs a new OffCanvasRenderer.
WideModalRenderer::__construct in core/modules/system/tests/modules/dialog_renderer_test/src/Render/MainContent/WideModalRenderer.php
Constructs a new WideModalRenderer.

File

core/lib/Drupal/Core/Render/MainContent/DialogRenderer.php, line 40

Class

DialogRenderer
Default main content renderer for dialog requests.

Namespace

Drupal\Core\Render\MainContent

Code

public function __construct(TitleResolverInterface $title_resolver, RendererInterface $renderer = NULL) {
  $this->titleResolver = $title_resolver;
  if ($renderer === NULL) {
    @trigger_error('The renderer service must be passed to ' . __METHOD__ . ' and will be required before Drupal 9.0.0. See https://www.drupal.org/node/3009400', E_USER_DEPRECATED);
    $renderer = \Drupal::service('renderer');
  }
  $this->renderer = $renderer;
}