function Drupal::token
Returns the token service.
Return value
\Drupal\Core\Utility\Token The token service.
9 calls to Drupal::token()
- CommentTokensHooks::tokens in core/
modules/ comment/ src/ Hook/ CommentTokensHooks.php - Implements hook_tokens().
- FileHooks::tokens in core/
modules/ file/ src/ Hook/ FileHooks.php - Implements hook_tokens().
- hook_tokens in core/
lib/ Drupal/ Core/ Utility/ token.api.php - Provide replacement values for placeholder tokens.
- NodeTokensHooks::tokens in core/
modules/ node/ src/ Hook/ NodeTokensHooks.php - Implements hook_tokens().
- SystemHooks::mail in core/
modules/ system/ src/ Hook/ SystemHooks.php - Implements hook_mail().
File
-
core/
lib/ Drupal.php, line 566
Class
- Drupal
- Static Service Container wrapper.
Code
public static function token() {
return static::getContainer()->get('token');
}