You are here

public function UserFromWrapper::resolve in Open Social 10.1.x

Same name and namespace in other branches
  1. 10.3.x modules/social_features/social_user/src/Plugin/GraphQL/DataProducer/UserFromWrapper.php \Drupal\social_user\Plugin\GraphQL\DataProducer\UserFromWrapper::resolve()
  2. 10.2.x modules/social_features/social_user/src/Plugin/GraphQL/DataProducer/UserFromWrapper.php \Drupal\social_user\Plugin\GraphQL\DataProducer\UserFromWrapper::resolve()

Resolves the value.

Parameters

\Drupal\social_user\Wrappers\UserAwareInterface $data: A class that contains user information.

Return value

\Drupal\user\UserInterface|null The user entity.

File

modules/social_features/social_user/src/Plugin/GraphQL/DataProducer/UserFromWrapper.php, line 39

Class

UserFromWrapper
Get the user information from a relationship.

Namespace

Drupal\social_user\Plugin\GraphQL\DataProducer

Code

public function resolve(UserAwareInterface $data) : ?UserInterface {
  return $data
    ->getUser();
}