function PreviewToggleTrait::currentUser

Same name in other branches
  1. 8.9.x core/modules/layout_builder/src/Form/PreviewToggleTrait.php \Drupal\layout_builder\Form\PreviewToggleTrait::currentUser()
  2. 10 core/modules/layout_builder/src/Form/PreviewToggleTrait.php \Drupal\layout_builder\Form\PreviewToggleTrait::currentUser()
  3. 11.x core/modules/layout_builder/src/Form/PreviewToggleTrait.php \Drupal\layout_builder\Form\PreviewToggleTrait::currentUser()

Gets the current user.

Return value

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

1 call to PreviewToggleTrait::currentUser()
OverridesEntityForm::buildMessage in core/modules/layout_builder/src/Form/OverridesEntityForm.php
Renders a message to display at the top of the layout builder.

File

core/modules/layout_builder/src/Form/PreviewToggleTrait.php, line 41

Class

PreviewToggleTrait
Provides a trait that provides a toggle for the content preview.

Namespace

Drupal\layout_builder\Form

Code

protected abstract function currentUser();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.