Mercurial > hg > isophonics-drupal-site
comparison core/modules/big_pipe/src/Render/BigPipe.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 7a779792577d |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
418 $this->sendChunk($multi_occurrence_placeholders_content[$fragment]); | 418 $this->sendChunk($multi_occurrence_placeholders_content[$fragment]); |
419 continue; | 419 continue; |
420 } | 420 } |
421 | 421 |
422 $placeholder = $fragment; | 422 $placeholder = $fragment; |
423 assert('isset($no_js_placeholders[$placeholder])'); | 423 assert(isset($no_js_placeholders[$placeholder])); |
424 $token = Crypt::randomBytesBase64(55); | 424 $token = Crypt::randomBytesBase64(55); |
425 | 425 |
426 // Render the placeholder, but include the cumulative settings assets, so | 426 // Render the placeholder, but include the cumulative settings assets, so |
427 // we can calculate the overall settings for the entire page. | 427 // we can calculate the overall settings for the entire page. |
428 $placeholder_plus_cumulative_settings = [ | 428 $placeholder_plus_cumulative_settings = [ |
627 * The filtered response, which will load only the assets that $fake_request | 627 * The filtered response, which will load only the assets that $fake_request |
628 * did not indicate to already have been loaded, plus the updated cumulative | 628 * did not indicate to already have been loaded, plus the updated cumulative |
629 * AJAX page state. | 629 * AJAX page state. |
630 */ | 630 */ |
631 protected function filterEmbeddedResponse(Request $fake_request, Response $embedded_response) { | 631 protected function filterEmbeddedResponse(Request $fake_request, Response $embedded_response) { |
632 assert('$embedded_response instanceof \Drupal\Core\Render\HtmlResponse || $embedded_response instanceof \Drupal\Core\Ajax\AjaxResponse'); | 632 assert($embedded_response instanceof HtmlResponse || $embedded_response instanceof AjaxResponse); |
633 return $this->filterResponse($fake_request, HttpKernelInterface::SUB_REQUEST, $embedded_response); | 633 return $this->filterResponse($fake_request, HttpKernelInterface::SUB_REQUEST, $embedded_response); |
634 } | 634 } |
635 | 635 |
636 /** | 636 /** |
637 * Filters the given response. | 637 * Filters the given response. |
647 * | 647 * |
648 * @return \Symfony\Component\HttpFoundation\Response | 648 * @return \Symfony\Component\HttpFoundation\Response |
649 * The filtered response. | 649 * The filtered response. |
650 */ | 650 */ |
651 protected function filterResponse(Request $request, $request_type, Response $response) { | 651 protected function filterResponse(Request $request, $request_type, Response $response) { |
652 assert('$request_type === \Symfony\Component\HttpKernel\HttpKernelInterface::MASTER_REQUEST || $request_type === \Symfony\Component\HttpKernel\HttpKernelInterface::SUB_REQUEST'); | 652 assert($request_type === HttpKernelInterface::MASTER_REQUEST || $request_type === HttpKernelInterface::SUB_REQUEST); |
653 $this->requestStack->push($request); | 653 $this->requestStack->push($request); |
654 $event = new FilterResponseEvent($this->httpKernel, $request, $request_type, $response); | 654 $event = new FilterResponseEvent($this->httpKernel, $request, $request_type, $response); |
655 $this->eventDispatcher->dispatch(KernelEvents::RESPONSE, $event); | 655 $this->eventDispatcher->dispatch(KernelEvents::RESPONSE, $event); |
656 $filtered_response = $event->getResponse(); | 656 $filtered_response = $event->getResponse(); |
657 $this->requestStack->pop(); | 657 $this->requestStack->pop(); |