function LinkBase::currentUser
Gets the current active user.
@todo https://www.drupal.org/node/2105123 put this method in \Drupal\Core\Plugin\PluginBase instead.
Return value
\Drupal\Core\Session\AccountInterface The current user.
1 call to LinkBase::currentUser()
- LinkBase::checkUrlAccess in core/modules/ views/ src/ Plugin/ views/ field/ LinkBase.php 
- Checks access to the link route.
File
- 
              core/modules/ views/ src/ Plugin/ views/ field/ LinkBase.php, line 111 
Class
- LinkBase
- Field handler to present a link to an entity.
Namespace
Drupal\views\Plugin\views\fieldCode
protected function currentUser() {
  if (!$this->currentUser) {
    $this->currentUser = \Drupal::currentUser();
  }
  return $this->currentUser;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
