You are here

function template_preprocess_sarnia_entity in Sarnia 7

Preprocess function for displaying a Sarnia entity.

See also

sarnia-entity.tpl.php, template_preprocess_user_profile(), user-profile.tpl.php

File

./sarnia.module, line 1033

Code

function template_preprocess_sarnia_entity(&$variables) {
  $entity = $variables['elements']['#entity'];

  // Helpful $content variable for templates.
  foreach (element_children($variables['elements']) as $key) {
    $variables['content'][$key] = $variables['elements'][$key];
  }

  // Preprocess fields.
  field_attach_preprocess($entity->type, $entity, $variables['elements'], $variables);
}