You are here

function theme_views_send_token_help in Views Send 7

Same name and namespace in other branches
  1. 6 views_send.module \theme_views_send_token_help()

Theme the replacement tokens.

@todo: Add help for other tokens

Parameters

$tokens:: Keyed array with tokens as keys and description as values.

Return value

A themed table wirh all tokens.

1 theme call to theme_views_send_token_help()
views_send_config_form in ./views_send.module
Multistep form callback for the "configure" step.

File

./views_send.module, line 1242
The Views Send module.

Code

function theme_views_send_token_help($fields) {
  $header = array(
    t('Token'),
    t('Replacement value'),
  );
  $rows = array();
  foreach ($fields as $field => $title) {
    $rows[] = array(
      VIEWS_SEND_TOKEN_PREFIX . sprintf(VIEWS_SEND_TOKEN_PATTERN, $field) . VIEWS_SEND_TOKEN_POSTFIX,
      $title,
    );
  }
  $output = theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  return $output;
}