You are here

function _notifications_content_test_format_template in Notifications 7

Same name and namespace in other branches
  1. 6.4 notifications_content/notifications_content.pages.inc \_notifications_content_test_format_template()

Format template information as table

1 call to _notifications_content_test_format_template()
notifications_content_test_template_form in notifications_content/notifications_content.admin.inc
Template testing form

File

notifications_content/notifications_content.admin.inc, line 201
Subscriptions to content events

Code

function _notifications_content_test_format_template($parts) {
  $rows = array();
  $header = array(
    'msgkey' => t('Key'),
    'type' => t('Template'),
    'method' => t('Method'),
    'message' => t('Text'),
    'language' => t('Language'),
    'format' => t('Format'),
  );
  foreach ($parts as $key => $value) {
    $row = array();
    foreach (array_keys($header) as $field) {
      $row[] = isset($value->{$field}) ? check_plain($value->{$field}) : '';
    }
    $rows[] = $row;
  }
  return theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
}