You are here

public function AuthenticationLinkProvider::setCurrentUser in JSON:API Hypermedia 8

Sets the current account.

Parameters

\Drupal\Core\Session\AccountInterface $current_user: The current account.

File

examples/Plugin/jsonapi_hypermedia/LinkProvider/AuthenticationLinkProvider.php, line 53

Class

AuthenticationLinkProvider
Adds an `authenticate` link for unauthenticated requests.

Namespace

Drupal\jsonapi_hypermedia\Plugin\jsonapi_hypermedia\LinkProvider

Code

public function setCurrentUser(AccountInterface $current_user) {
  $this->currentUser = $current_user;
}