You are here

acquia_lift_profiles.theme.inc in Acquia Lift Connector 7.2

acquia_lift_profiles.theme.inc Provides theme functions for Acquia Lift Profiles.

File

acquia_lift_profiles/theme/acquia_lift_profiles.theme.inc
View source
<?php

/**
 * @file acquia_lift_profiles.theme.inc
 * Provides theme functions for Acquia Lift Profiles.
 */

/**
 * Theme callback for the form table.
 */
function theme_acquia_lift_profiles_lift_event_value_form_table($variables) {
  $element = $variables['element'];
  $header = array(
    t('Visitor Action'),
    t('Engagement Score'),
    t('Global Value'),
  );
  $rows = array();

  // Traverse each row.
  foreach (element_children($element) as $row_index) {
    $rows[] = array(
      array(
        'data' => $element[$row_index]['#label'],
      ),
      array(
        'data' => $element[$row_index]['engagement_score'],
      ),
      array(
        'data' => $element[$row_index]['global_value'],
      ),
    );
  }

  // Render the table and return.
  return theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
}

Functions

Namesort descending Description
theme_acquia_lift_profiles_lift_event_value_form_table Theme callback for the form table.