public static function Drupal::currentUser in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal.php \Drupal::currentUser()
Gets the current active user.
Return value
\Drupal\Core\Session\AccountProxyInterface
53 calls to Drupal::currentUser()
- book_form_node_form_alter in core/
modules/ book/ book.module - Implements hook_form_BASE_FORM_ID_alter() for node_form().
- book_node_links_alter in core/
modules/ book/ book.module - Implements hook_node_links_alter().
- book_node_prepare_form in core/
modules/ book/ book.module - Implements hook_ENTITY_TYPE_prepare_form() for node entities.
- content_translation_translate_access in core/
modules/ content_translation/ content_translation.module - Access callback for the translation overview page.
- DisplayPluginBase::access in core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php - Determines if the user has access to this display of the view.
File
- core/
lib/ Drupal.php, line 246 - Contains \Drupal.
Class
- Drupal
- Static Service Container wrapper.
Code
public static function currentUser() {
return static::getContainer()
->get('current_user');
}