function BigPipeStrategy::processPlaceholders
Same name in other branches
- 8.9.x core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php \Drupal\big_pipe\Render\Placeholder\BigPipeStrategy::processPlaceholders()
- 10 core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php \Drupal\big_pipe\Render\Placeholder\BigPipeStrategy::processPlaceholders()
- 11.x core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php \Drupal\big_pipe\Render\Placeholder\BigPipeStrategy::processPlaceholders()
Overrides PlaceholderStrategyInterface::processPlaceholders
File
-
core/
modules/ big_pipe/ src/ Render/ Placeholder/ BigPipeStrategy.php, line 108
Class
- BigPipeStrategy
- Defines the BigPipe placeholder strategy, to send HTML in chunks.
Namespace
Drupal\big_pipe\Render\PlaceholderCode
public function processPlaceholders(array $placeholders) {
$request = $this->requestStack
->getCurrentRequest();
// @todo remove this check when https://www.drupal.org/node/2367555 lands.
if (!$request->isMethodCacheable()) {
return [];
}
// Routes can opt out from using the BigPipe HTML delivery technique.
if ($this->routeMatch
->getRouteObject()
->getOption('_no_big_pipe')) {
return [];
}
if (!$this->sessionConfiguration
->hasSession($request)) {
return [];
}
return $this->doProcessPlaceholders($placeholders);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.