protected function TwigExtensionBase::getCurrentUser in Bamboo Twig 8.2
Same name and namespace in other branches
- 8.5 src/TwigExtension/TwigExtensionBase.php \Drupal\bamboo_twig\TwigExtension\TwigExtensionBase::getCurrentUser()
 - 8.3 src/TwigExtension/TwigExtensionBase.php \Drupal\bamboo_twig\TwigExtension\TwigExtensionBase::getCurrentUser()
 - 8.4 src/TwigExtension/TwigExtensionBase.php \Drupal\bamboo_twig\TwigExtension\TwigExtensionBase::getCurrentUser()
 
Lazy loading for the Drupal current user account proxy.
Return value
\Drupal\Core\Session\AccountInterface Return The current user account proxy.
3 calls to TwigExtensionBase::getCurrentUser()
- Loader::loadCurrentUser in bamboo_twig_loader/
src/ TwigExtension/ Loader.php  - Return the current user object.
 - Security::hasPermission in bamboo_twig_security/
src/ TwigExtension/ Security.php  - Does the current|given user has the given permission ?
 - Security::hasRole in bamboo_twig_security/
src/ TwigExtension/ Security.php  - Does the current|given user has the given permission ?
 
File
- src/
TwigExtension/ TwigExtensionBase.php, line 107  
Class
- TwigExtensionBase
 - Provides a Twig Extension Lazy Service Injection.
 
Namespace
Drupal\bamboo_twig\TwigExtensionCode
protected function getCurrentUser() {
  return $this->container
    ->get('current_user');
}