You are here

protected function FieldPluginBase::getLanguageContext in GraphQL 8.3

Get the language context instance.

Return value

\Drupal\graphql\GraphQLLanguageContext The language context service.

1 call to FieldPluginBase::getLanguageContext()
FieldPluginBase::resolveDeferred in src/Plugin/GraphQL/Fields/FieldPluginBase.php

File

src/Plugin/GraphQL/Fields/FieldPluginBase.php, line 76

Class

FieldPluginBase

Namespace

Drupal\graphql\Plugin\GraphQL\Fields

Code

protected function getLanguageContext() {
  if (!isset($this->languageContext)) {
    $this->languageContext = \Drupal::service('graphql.language_context');
  }
  return $this->languageContext;
}