Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Renderer.php

function 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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal