BigPipeInterface

Interface for sending an HTML response in chunks (to get faster page loads). At a high level, BigPipe sends a HTML response in chunks: 1. one chunk: everything until just before </body> — this contains BigPipe placeholders for the personalized parts of the page. Hence this sends the non-personalized parts of the page. Let's call it The Skeleton. 2. N chunks: a <script> tag per BigPipe placeholder in The Skeleton. 3. one chunk: </body> and everything after it. This is conceptua

BigPipeController::setNoJsCookie

public BigPipeController::setNoJsCookie(Request $request) Sets a BigPipe no-JS cookie, redirects back to the original location. Parameters \Symfony\Component\HttpFoundation\Request $request: The current request. Return value \Drupal\Core\Routing\LocalRedirectResponse A response that sets the no-JS cookie and redirects back to the original location. Throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException Thrown when the no-JS cookie is already set or when there is no session.

BigPipeController

Returns responses for BigPipe module routes. Hierarchy class \Drupal\big_pipe\Controller\BigPipeController File core/modules/big_pipe/src/Controller/BigPipeController.php, line 16 Namespace Drupal\big_pipe\Controller Members Name Modifiers Type Description BigPipeController::setNoJsCookie public function Sets a BigPipe no-JS cookie, redirects back to the original location.

BigPipe::__construct

public BigPipe::__construct(RendererInterface $renderer, SessionInterface $session, RequestStack $request_stack, HttpKernelInterface $http_kernel, EventDispatcherInterface $event_dispatcher, ConfigFactoryInterface $config_factory) Constructs a new BigPipe class. Parameters \Drupal\Core\Render\RendererInterface $renderer: The renderer. \Symfony\Component\HttpFoundation\Session\SessionInterface $session: The session. \Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stac

BigPipe::STOP_SIGNAL

The BigPipe placeholder replacements stop signal. File core/modules/big_pipe/src/Render/BigPipe.php, line 40 Class BigPipe The default BigPipe service. Namespace Drupal\big_pipe\Render Code const STOP_SIGNAL = '<script type="application/vnd.drupal-ajax" data-big-pipe-event="stop"></script>';

BigPipe::START_SIGNAL

The BigPipe placeholder replacements start signal. File core/modules/big_pipe/src/Render/BigPipe.php, line 33 Class BigPipe The default BigPipe service. Namespace Drupal\big_pipe\Render Code const START_SIGNAL = '<script type="application/vnd.drupal-ajax" data-big-pipe-event="start"></script>';

BigPipe::sendPreBody

protected BigPipe::sendPreBody($pre_body, array $no_js_placeholders, AttachedAssetsInterface $cumulative_assets) Sends everything until just before </body>. Parameters string $pre_body: The HTML response's content until the closing </body> tag. array $no_js_placeholders: The no-JS BigPipe placeholders. \Drupal\Core\Asset\AttachedAssetsInterface $cumulative_assets: The cumulative assets sent so far; to be updated while rendering no-JS BigPipe placeholders. File core/modules/big_pipe

BigPipe::sendPostBody

protected BigPipe::sendPostBody($post_body) Sends </body> and everything after it. Parameters string $post_body: The HTML response's content after the closing </body> tag. File core/modules/big_pipe/src/Render/BigPipe.php, line 496 Class BigPipe The default BigPipe service. Namespace Drupal\big_pipe\Render Code protected function sendPostBody($post_body) { print '</body>'; print $post_body; flush(); }

BigPipe::sendPlaceholders

protected BigPipe::sendPlaceholders(array $placeholders, array $placeholder_order, AttachedAssetsInterface $cumulative_assets) Sends BigPipe placeholders' replacements as embedded AJAX responses. Parameters array $placeholders: Associative array; the BigPipe placeholders. Keys are the BigPipe placeholder IDs. array $placeholder_order: Indexed array; the order in which the BigPipe placeholders must be sent. Values are the BigPipe placeholder IDs. (These values correspond to keys in $placeholder

BigPipe::sendNoJsPlaceholders

protected BigPipe::sendNoJsPlaceholders($html, $no_js_placeholders, AttachedAssetsInterface $cumulative_assets) Sends no-JS BigPipe placeholders' replacements as embedded HTML responses. Parameters string $html: HTML markup. array $no_js_placeholders: Associative array; the no-JS BigPipe placeholders. Keys are the BigPipe selectors. \Drupal\Core\Asset\AttachedAssetsInterface $cumulative_assets: The cumulative assets sent so far; to be updated while rendering no-JS BigPipe placeholders. Throws