You are here

token_filter.module in Token Filter 8

Core functions for the Token Filter module.

File

token_filter.module
View source
<?php

/**
 * @file
 * Core functions for the Token Filter module.
 */
use Drupal\Core\Entity\ContentEntityInterface;

/**
 * Implements hook_preprocess_HOOK().
 */
function token_filter_preprocess_field(&$variables) {
  if (isset($variables['element']['#object']) && $variables['element']['#object'] instanceof ContentEntityInterface) {
    $entity =& drupal_static('token_filter_entity');
    $entity = $variables['element']['#object'];
  }
}

Functions