You are here

public function OffCanvasRenderer::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Render/MainContent/OffCanvasRenderer.php \Drupal\Core\Render\MainContent\OffCanvasRenderer::__construct()
  2. 9 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;
}