You are here

protected function BigPipeSessionlessStrategy::doProcessPlaceholders in Sessionless BigPipe 2.x

Same name and namespace in other branches
  1. 8 src/Render/Placeholder/BigPipeSessionlessStrategy.php \Drupal\big_pipe_sessionless\Render\Placeholder\BigPipeSessionlessStrategy::doProcessPlaceholders()

Transforms placeholders to BigPipe placeholders, only no-JS.

Only no-JS placeholders to allow BigPipe to accelerate Page Cache misses.

Parameters

array $placeholders: The placeholders to process.

Return value

array The BigPipe placeholders.

Overrides BigPipeStrategy::doProcessPlaceholders

1 call to BigPipeSessionlessStrategy::doProcessPlaceholders()
BigPipeSessionlessStrategy::processPlaceholders in src/Render/Placeholder/BigPipeSessionlessStrategy.php
Processes placeholders to render them with different strategies.

File

src/Render/Placeholder/BigPipeSessionlessStrategy.php, line 75

Class

BigPipeSessionlessStrategy
Defines the BigPipe sessionless placeholder strategy, to send HTML in chunks.

Namespace

Drupal\big_pipe_sessionless\Render\Placeholder

Code

protected function doProcessPlaceholders(array $placeholders) {
  $overridden_placeholders = [];
  foreach ($placeholders as $placeholder => $placeholder_elements) {
    $overridden_placeholders[$placeholder] = static::createBigPipeNoJsPlaceholder($placeholder, $placeholder_elements, static::placeholderIsAttributeSafe($placeholder));
  }
  return $overridden_placeholders;
}