You are here

public function Http2ServerPushServiceProvider::register in HTTP/2 Server Push 8

Registers services to the container.

Parameters

ContainerBuilder $container: The ContainerBuilder to register services to.

Overrides ServiceProviderInterface::register

File

src/Http2ServerPushServiceProvider.php, line 17

Class

Http2ServerPushServiceProvider

Namespace

Drupal\http2_server_push

Code

public function register(ContainerBuilder $container) {
  if (!$this
    ->cssAggregationIsEnabled()) {
    $container
      ->removeDefinition('asset.css.collection_renderer.http2_server_push');
  }
  if (!$this
    ->jsAggregationIsEnabled()) {
    $container
      ->removeDefinition('asset.js.collection_renderer.http2_server_push');
  }
}