statistics_tokens
function statistics_tokens
statistics_tokens($type, $tokens, array $data, array $options, BubbleableMetadata$bubbleable_metadata)
Implements hook_tokens().
File
- core/modules/statistics/statistics.tokens.inc, line 36
- Builds placeholder replacement tokens for node visitor statistics.
Code
function statistics_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { $token_service = \Drupal::token(); $replacements = array(); if ($type == 'node' & !empty($data['node'])) { $node = $data['node']; foreach ($toke