class SerializationServiceProvider

Same name in other branches
  1. 9 core/modules/serialization/src/SerializationServiceProvider.php \Drupal\serialization\SerializationServiceProvider
  2. 8.9.x core/modules/serialization/src/SerializationServiceProvider.php \Drupal\serialization\SerializationServiceProvider
  3. 10 core/modules/serialization/src/SerializationServiceProvider.php \Drupal\serialization\SerializationServiceProvider

Serialization dependency injection container.

Hierarchy

Expanded class hierarchy of SerializationServiceProvider

File

core/modules/serialization/src/SerializationServiceProvider.php, line 11

Namespace

Drupal\serialization
View source
class SerializationServiceProvider implements ServiceProviderInterface {
    
    /**
     * {@inheritdoc}
     */
    public function register(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());
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
SerializationServiceProvider::register public function Overrides ServiceProviderInterface::register

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.