function JsonapiServiceProvider::register
Registers services to the container.
Parameters
ContainerBuilder $container: The ContainerBuilder to register services to.
Overrides ServiceProviderInterface::register
File
-
core/
modules/ jsonapi/ src/ JsonapiServiceProvider.php, line 39
Class
- JsonapiServiceProvider
- Adds 'api_json' as known format and prevents its use in the REST module.
Namespace
Drupal\jsonapiCode
public function register(ContainerBuilder $container) {
$container->addCompilerPass(new RegisterSerializationClassesCompilerPass());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.