You are here

public static function Drupal::token in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal.php \Drupal::token()

Returns the token service.

Return value

\Drupal\Core\Utility\Token The token service.

17 calls to Drupal::token()
CommentTokenReplaceTest::testCommentTokenReplacement in core/modules/comment/src/Tests/CommentTokenReplaceTest.php
Creates a comment, then tests the tokens generated from it.
comment_tokens in core/modules/comment/comment.tokens.inc
Implements hook_tokens().
DrupalTest::testToken in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the token() method.
FileTokenReplaceTest::testFileTokenReplacement in core/modules/file/src/Tests/FileTokenReplaceTest.php
Creates a file, then tests the tokens generated from it.
file_tokens in core/modules/file/file.module
Implements hook_tokens().

... See full list

File

core/lib/Drupal.php, line 494
Contains \Drupal.

Class

Drupal
Static Service Container wrapper.

Code

public static function token() {
  return static::getContainer()
    ->get('token');
}