You are here

66 calls to Drupal::currentUser() in Drupal 8

BlockContentEntityReferenceSelectionTest::setUp in core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php
book_form_node_form_alter in core/modules/book/book.module
Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\NodeForm.
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.
ChooseBlockController::__construct in core/modules/layout_builder/src/Controller/ChooseBlockController.php
ChooseBlockController constructor.
CommentFieldItemList::access in core/modules/comment/src/CommentFieldItemList.php
Checks data value access.
content_moderation_views_query_substitutions in core/modules/content_moderation/content_moderation.views_execution.inc
Implements hook_views_query_substitutions().
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.
DrupalTest::testCurrentUser in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the currentUser() method.
Editor::getAttachments in core/modules/editor/src/Plugin/InPlaceEditor/Editor.php
Returns the attachments for this editor.
EntityAccessControlHandler::prepareUser in core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php
Loads the current account object, if it does not exist yet.
EntityKernelTestBaseTest::testSetUpCurrentUser in core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php
Tests that the current user is set up correctly.
FieldEntityLinkTest::testEntityLink in core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php
Tests entity link fields.
FieldResolver::getFieldAccess in core/modules/jsonapi/src/Context/FieldResolver.php
Gets the field access result for the 'view' operation.
field_ui_entity_operation in core/modules/field_ui/field_ui.module
Implements hook_entity_operation().
file_save_data in core/modules/file/file.module
Saves a file to the specified destination and creates a database entry.
file_validate_size in core/modules/file/file.module
Checks that the file's size is below certain limits.
FilterPluginBase::storeExposedInput in core/modules/views/src/Plugin/views/filter/FilterPluginBase.php
If set to remember exposed input in the session, store it there.
filter_default_format in core/modules/filter/filter.module
Returns the ID of the default text format for a particular user.
FormBase::currentUser in core/lib/Drupal/Core/Form/FormBase.php
Gets the current user.
FormBuilder::currentUser in core/lib/Drupal/Core/Form/FormBuilder.php
Gets the current active user.
FormElement::processAutocomplete in core/lib/Drupal/Core/Render/Element/FormElement.php
Adds autocomplete functionality to elements.
history_write in core/modules/history/history.module
Updates 'last viewed' timestamp of the specified entity for the current user.
hook_file_url_alter in core/lib/Drupal/Core/File/file.api.php
Alter the URL to a file.
hook_js_settings_alter in core/lib/Drupal/Core/Render/theme.api.php
Perform necessary alterations to the JavaScript settings (drupalSettings).
hook_user_cancel_methods_alter in core/modules/user/user.api.php
Modify account cancellation methods.
hook_views_pre_execute in core/modules/views/views.api.php
Act on the view after the query is built and just before it is executed.
hook_views_pre_view in core/modules/views/views.api.php
Alter a view at the very beginning of Views processing.
InlineBlock::__construct in core/modules/layout_builder/src/Plugin/Block/InlineBlock.php
Constructs a new InlineBlock.
language_get_default_langcode in core/modules/language/language.module
Returns the default language code assigned to an entity type and a bundle.
LinkBase::currentUser in core/modules/views/src/Plugin/views/field/LinkBase.php
Gets the current active user.
ListingEmpty::render in core/modules/node/src/Plugin/views/area/ListingEmpty.php
Render the area.
LocaleLookup::getCid in core/modules/locale/src/LocaleLookup.php
Gets the cache ID.
MediaLibraryWidget::__construct in core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php
Constructs a MediaLibraryWidget widget.
media_views_query_substitutions in core/modules/media/media.module
Implements hook_views_query_substitutions().
NodeNewComments::preRender in core/modules/comment/src/Plugin/views/field/NodeNewComments.php
Runs before any fields are rendered.
NodeViewController::__construct in core/modules/node/src/Controller/NodeViewController.php
Creates an NodeViewController object.
node_access_view_all_nodes in core/modules/node/node.module
Determines whether the user has a global viewing grant for all nodes.
node_get_recent in core/modules/node/node.module
Finds the most recently changed nodes that are available to the current user.
node_query_node_access_alter in core/modules/node/node.module
Implements hook_query_TAG_alter().
node_views_query_substitutions in core/modules/node/node.views_execution.inc
Implements hook_views_query_substitutions().
OptionsWidgetBase::getOptions in core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
Returns the array of options for the widget.
OverridesSectionStorage::__construct in core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php
Overrides \Drupal\Component\Plugin\PluginBase::__construct().
shortcut_current_displayed_set in core/modules/shortcut/shortcut.module
Returns the current displayed shortcut set for the provided user account.
shortcut_default_set in core/modules/shortcut/shortcut.module
Returns the default shortcut set for a given user account.
shortcut_help in core/modules/shortcut/shortcut.module
Implements hook_help().
shortcut_set_edit_access in core/modules/shortcut/shortcut.module
Access callback for editing a shortcut set.
shortcut_set_switch_access in core/modules/shortcut/shortcut.module
Access callback for switching the shortcut set assigned to a user account.
shortcut_toolbar in core/modules/shortcut/shortcut.module
Implements hook_toolbar().
system_get_module_admin_tasks in core/modules/system/system.module
Generate a list of tasks offered by a specified module.
system_user_timezone in core/modules/system/system.module
Add the time zone field to the user edit and register forms.
template_preprocess_forum_list in core/modules/forum/forum.module
Prepares variables for forum list templates.
TemporaryQueryGuard::getAccessCondition in core/modules/jsonapi/src/Access/TemporaryQueryGuard.php
Gets an EntityConditionGroup that filters out inaccessible entities.
TestBase::prepareEnvironment in core/modules/simpletest/src/TestBase.php
Prepares the current environment for running the test.
TextFormat::currentUser in core/modules/filter/src/Element/TextFormat.php
Wraps the current user.
update_authorize_update_batch_finished in core/modules/update/update.authorize.inc
Batch callback: Performs actions when the authorized update batch is done.
UserTrackerTab::currentUser in core/modules/tracker/src/Plugin/Menu/UserTrackerTab.php
Gets the current active user.
user_js_settings_alter in core/modules/user/user.module
Implements hook_js_settings_alter().
user_logout in core/modules/user/user.module
Logs the current user out.
user_template_preprocess_default_variables_alter in core/modules/user/user.module
Implements hook_template_preprocess_default_variables_alter().
user_toolbar in core/modules/user/user.module
Implements hook_toolbar().
ViewExecutable::__wakeup in core/modules/views/src/ViewExecutable.php
Magic method implementation to unserialize the view executable.
workspaces_toolbar in core/modules/workspaces/workspaces.module
Implements hook_toolbar().
_file_save_upload_single in core/modules/file/file.module
Saves a file upload to a new location.
_filter_tips in core/modules/filter/filter.module
Retrieves the filter tips.