You are here

protected function AccessControlHandler::currentUser in Block Content Permissions 8

Returns the current user.

Return value

\Drupal\Core\Session\AccountInterface The current user.

3 calls to AccessControlHandler::currentUser()
AccessControlHandler::blockContentAddFormAccess in src/AccessControlHandler.php
Access check for the block content add forms.
AccessControlHandler::blockContentAddPageAccess in src/AccessControlHandler.php
Access check for the block content add page.
AccessControlHandler::blockContentTypeAdministerAccess in src/AccessControlHandler.php
Access check for the block content type administer pages and forms.

File

src/AccessControlHandler.php, line 89

Class

AccessControlHandler
Controller for the block content permissions.

Namespace

Drupal\block_content_permissions

Code

protected function currentUser() {
  if (!$this->currentUser) {
    $this->currentUser = $this
      ->container()
      ->get('current_user');
  }
  return $this->currentUser;
}