class GraphqlServiceProvider in GraphQL 8.4
Same name and namespace in other branches
- 8.3 src/GraphqlServiceProvider.php \Drupal\graphql\GraphqlServiceProvider
Workaround for Drupal core bug for language sorting.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\graphql\GraphqlServiceProvider
Expanded class hierarchy of GraphqlServiceProvider
File
- src/
GraphqlServiceProvider.php, line 12
Namespace
Drupal\graphqlView source
class GraphqlServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) : void {
// Can be removed if this is fixed.
// https://www.drupal.org/project/drupal/issues/2952789
if ($container
->hasDefinition('language_negotiator')) {
$container
->getDefinition('language_negotiator')
->setClass(LanguageNegotiator::class);
}
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GraphqlServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |
|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |