public static function LanguageTypeResolver::getId in GraphQL 8
Same name and namespace in other branches
- 8.2 src/TypeResolver/LanguageTypeResolver.php \Drupal\graphql\TypeResolver\LanguageTypeResolver::getId()
Gets the ID (language code).
Parameters
\Drupal\Core\TypedData\Plugin\DataType\Language: The language object.
Return value
string The language code.
File
- src/
TypeResolver/ LanguageTypeResolver.php, line 99
Class
- LanguageTypeResolver
- Resolves the schema for the 'language' data type.
Namespace
Drupal\graphql\TypeResolverCode
public static function getId(Language $language) {
return $language
->getValue()
->getId();
}