token_filter.module in Token Filter 8
Same filename and directory in other branches
Core functions for the Token Filter module.
File
token_filter.moduleView 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
Name | Description |
---|---|
token_filter_preprocess_field | Implements hook_preprocess_HOOK(). |