6 calls to Drupal::token()

CommentTokenReplaceTest::testCommentTokenReplacement in core/modules/comment/tests/src/Functional/CommentTokenReplaceTest.php
Creates a comment, then tests the tokens generated from it.
DrupalTest::testToken in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the token() method.
hook_tokens in core/lib/Drupal/Core/Utility/token.api.php
Provide replacement values for placeholder tokens.
TokenReplaceTest::testTaxonomyTokenReplacement in core/modules/taxonomy/tests/src/Kernel/TokenReplaceTest.php
Creates some terms and a node, then tests the tokens generated from them.
UserTokenReplaceTest::testUserTokenReplacement in core/modules/user/tests/src/Functional/UserTokenReplaceTest.php
Creates a user, then tests the tokens generated from it.
user_mail in core/modules/user/user.module
Implements hook_mail().

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