You are here

public function ContentAccess::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/ContentAccess.php, line 109

Class

ContentAccess
Adds content access checks for nodes and comments.

Namespace

Drupal\search_api\Plugin\search_api\processor

Code

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