function JsonapiServiceProvider::register
Same name in other branches
- 9 core/modules/jsonapi/src/JsonapiServiceProvider.php \Drupal\jsonapi\JsonapiServiceProvider::register()
- 8.9.x core/modules/jsonapi/src/JsonapiServiceProvider.php \Drupal\jsonapi\JsonapiServiceProvider::register()
- 10 core/modules/jsonapi/src/JsonapiServiceProvider.php \Drupal\jsonapi\JsonapiServiceProvider::register()
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.