function Renderer::doRenderPlaceholder

Same name in other branches
  1. 10 core/lib/Drupal/Core/Render/Renderer.php \Drupal\Core\Render\Renderer::doRenderPlaceholder()

Renders a placeholder into markup.

Parameters

array $placeholder_element: The placeholder element by reference.

Return value

\Drupal\Component\Render\MarkupInterface|string The rendered HTML.

2 calls to Renderer::doRenderPlaceholder()
Renderer::renderPlaceholder in core/lib/Drupal/Core/Render/Renderer.php
Renders final HTML for a placeholder.
Renderer::replacePlaceholders in core/lib/Drupal/Core/Render/Renderer.php
Replaces placeholders.

File

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

Class

Renderer
Turns a render array into an HTML string.

Namespace

Drupal\Core\Render

Code

protected function doRenderPlaceholder(array &$placeholder_element) : MarkupInterface|string {
    // Prevent the render array from being auto-placeholdered again.
    $placeholder_element['#create_placeholder'] = FALSE;
    // Render the placeholder into markup.
    $markup = $this->renderInIsolation($placeholder_element);
    return $markup;
}

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