public function SerializationBundle::build

Overrides \Symfony\Component\HttpKernel\Bundle\Bundle::build().

Overrides Bundle::build

File

drupal/core/modules/serialization/lib/Drupal/serialization/SerializationBundle.php, line 21
Contains \Drupal\serialization\SerializationBundle.

Class

SerializationBundle
Serialization dependency injection container.

Namespace

Drupal\serialization

Code

public function build(ContainerBuilder $container) {

  // Add a compiler pass for adding Normalizers and Encoders to Serializer.
  $container
    ->addCompilerPass(new RegisterSerializationClassesCompilerPass());

  // Add a compiler pass for adding concrete Resolvers to chain Resolver.
  $container
    ->addCompilerPass(new RegisterEntityResolversCompilerPass());
}