public function AccountId::resolve in Open Social 10.1.x
Same name and namespace in other branches
- 10.3.x modules/social_features/social_user/src/Plugin/GraphQL/DataProducer/AccountId.php \Drupal\social_user\Plugin\GraphQL\DataProducer\AccountId::resolve()
- 10.0.x modules/social_features/social_user/src/Plugin/GraphQL/DataProducer/AccountId.php \Drupal\social_user\Plugin\GraphQL\DataProducer\AccountId::resolve()
- 10.2.x modules/social_features/social_user/src/Plugin/GraphQL/DataProducer/AccountId.php \Drupal\social_user\Plugin\GraphQL\DataProducer\AccountId::resolve()
Resolves the request to the requested values.
Parameters
\Drupal\Core\Session\AccountInterface $account: The account to get the id for.
Return value
mixed The user id.
File
- modules/
social_features/ social_user/ src/ Plugin/ GraphQL/ DataProducer/ AccountId.php, line 36
Class
- AccountId
- Retrieves the user ID for an account instance.
Namespace
Drupal\social_user\Plugin\GraphQL\DataProducerCode
public function resolve(AccountInterface $account) {
return $account
->id();
}