function OffCanvasRenderer::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Render/MainContent/OffCanvasRenderer.php \Drupal\Core\Render\MainContent\OffCanvasRenderer::__construct()
  2. 10 core/lib/Drupal/Core/Render/MainContent/OffCanvasRenderer.php \Drupal\Core\Render\MainContent\OffCanvasRenderer::__construct()
  3. 11.x core/lib/Drupal/Core/Render/MainContent/OffCanvasRenderer.php \Drupal\Core\Render\MainContent\OffCanvasRenderer::__construct()

Constructs a new OffCanvasRenderer.

Parameters

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

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

string $position: (optional) The position to render the off-canvas dialog.

Overrides DialogRenderer::__construct

File

core/lib/Drupal/Core/Render/MainContent/OffCanvasRenderer.php, line 43

Class

OffCanvasRenderer
Default main content renderer for off-canvas dialog requests.

Namespace

Drupal\Core\Render\MainContent

Code

public function __construct(TitleResolverInterface $title_resolver, RendererInterface $renderer, $position = 'side') {
    parent::__construct($title_resolver, $renderer);
    $this->renderer = $renderer;
    $this->position = $position;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.