You are here

public function Renderer::renderPlain in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Render/Renderer.php \Drupal\Core\Render\Renderer::renderPlain()
  2. 9 core/lib/Drupal/Core/Render/Renderer.php \Drupal\Core\Render\Renderer::renderPlain()

File

core/lib/Drupal/Core/Render/Renderer.php, line 155

Class

Renderer
Turns a render array into an HTML string.

Namespace

Drupal\Core\Render

Code

public function renderPlain(&$elements) {
  return $this
    ->executeInRenderContext(new RenderContext(), function () use (&$elements) {
    return $this
      ->render($elements, TRUE);
  });
}