function DialogRenderer::__construct
Same name in other branches
- 9 core/lib/Drupal/Core/Render/MainContent/DialogRenderer.php \Drupal\Core\Render\MainContent\DialogRenderer::__construct()
- 10 core/lib/Drupal/Core/Render/MainContent/DialogRenderer.php \Drupal\Core\Render\MainContent\DialogRenderer::__construct()
- 11.x 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\MainContentCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.