protected Renderer::setCurrentRenderContext(RenderContext $context = NULL)
Sets the current render context.
Parameters
\Drupal\Core\Render\RenderContext|null $context: The render context. This can be NULL for instance when restoring the original render context, which is in fact NULL.
Return value
$this
File
- core/lib/Drupal/Core/Render/Renderer.php, line 606
Class
- Renderer
- Turns a render array into a HTML string.
Namespace
Drupal\Core\Render
Code
protected function setCurrentRenderContext(RenderContext $context = NULL) { $request = $this->requestStack->getCurrentRequest(); static::$contextCollection[$request] = $context; return $this; }
Please login to continue.