You are here

function template_preprocess_redhen_contact in RedHen CRM 8

Prepares variables for Contact templates.

Default template: redhen_contact.html.twig.

Parameters

array $variables: An associative array containing:

  • elements: An associative array containing the user information and any
  • attributes: HTML attributes for the containing element.

File

modules/redhen_contact/redhen_contact.page.inc, line 24
Contains redhen_contact.page.inc..

Code

function template_preprocess_redhen_contact(array &$variables) {

  // Fetch Contact Entity Object.
  $redhen_contact = $variables['elements']['#redhen_contact'];

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