You are here

public function BigPipeSessionlessServiceProvider::alter in Sessionless BigPipe 8

Same name and namespace in other branches
  1. 2.x src/BigPipeSessionlessServiceProvider.php \Drupal\big_pipe_sessionless\BigPipeSessionlessServiceProvider::alter()

Modifies existing service definitions.

Parameters

ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.

Overrides ServiceModifierInterface::alter

File

src/BigPipeSessionlessServiceProvider.php, line 19

Class

BigPipeSessionlessServiceProvider

Namespace

Drupal\big_pipe_sessionless

Code

public function alter(ContainerBuilder $container) {
  $container
    ->getDefinition('html_response.big_pipe_subscriber')
    ->setClass(HtmlResponseBigPipeSessionlessSubscriber::class)
    ->addArgument(new Reference('big_pipe_sessionless'))
    ->addArgument(new Reference('session_configuration'));
  $container
    ->getDefinition('http_middleware.page_cache')
    ->setClass(BigPipeSessionlessPageCache::class);
}