Exemplo n.º 1
0
 /**
  * Renders a placeholder, and just that placeholder.
  *
  * BigPipe renders placeholders independently of the rest of the content, so
  * it needs to be able to render placeholders by themselves.
  *
  * @param string $placeholder
  *   The placeholder to render.
  * @param array $placeholder_render_array
  *   The render array associated with that placeholder.
  *
  * @return array
  *   The render array representing the rendered placeholder.
  *
  * @see \Drupal\Core\Render\RendererInterface::renderPlaceholder()
  */
 protected function renderPlaceholder($placeholder, array $placeholder_render_array)
 {
     $elements = ['#markup' => $placeholder, '#attached' => ['placeholders' => [$placeholder => $placeholder_render_array]]];
     return $this->renderer->renderPlaceholder($placeholder, $elements);
 }