protected Renderer::setCurrentRenderContext(RenderContext $context = NULL)
Sets the current render context.
\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.
$this
protected function setCurrentRenderContext(RenderContext $context = NULL) { $request = $this->requestStack->getCurrentRequest(); static::$contextCollection[$request] = $context; return $this; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!Renderer.php/function/Renderer::setCurrentRenderContext/8.1.x