function AccessPolicyProcessorInFibersTest::lazyBuilderCheckCurrentUserCallback
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Session/AccessPolicyProcessorInFibersTest.php \Drupal\KernelTests\Core\Session\AccessPolicyProcessorInFibersTest::lazyBuilderCheckCurrentUserCallback()
Lazy builder that displays the current user ID.
Attributes
#[TrustedCallback]
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Session/ AccessPolicyProcessorInFibersTest.php, line 84
Class
- AccessPolicyProcessorInFibersTest
- Tests the behavior of the access policy processor running inside fibers.
Namespace
Drupal\KernelTests\Core\SessionCode
public static function lazyBuilderCheckCurrentUserCallback() : array {
return [
'#markup' => new FormattableMarkup('The current user id is @id.', [
'@id' => \Drupal::currentUser()->id(),
]),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.