You are here

public function RoleAccess::setCurrentUser in Search API 8

Sets the current user.

Parameters

\Drupal\Core\Session\AccountProxyInterface $current_user: The current user.

Return value

$this

File

src/Plugin/search_api/processor/RoleAccess.php, line 94

Class

RoleAccess
Adds access checks based on user roles.

Namespace

Drupal\search_api\Plugin\search_api\processor

Code

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