public static function LanguageTypeResolver::getWeight in GraphQL 8
Same name and namespace in other branches
- 8.2 src/TypeResolver/LanguageTypeResolver.php \Drupal\graphql\TypeResolver\LanguageTypeResolver::getWeight()
Gets the weight of the language.
Parameters
\Drupal\Core\TypedData\Plugin\DataType\Language: The language object.
Return value
int The weight, used to order languages with larger positive weights sinking items toward the bottom of lists.
File
- src/
TypeResolver/ LanguageTypeResolver.php, line 126
Class
- LanguageTypeResolver
- Resolves the schema for the 'language' data type.
Namespace
Drupal\graphql\TypeResolverCode
public static function getWeight(Language $language) {
return $language
->getValue()
->getWeight();
}