You are here

function _views_summarize_get_prefix_suffix in Views Summarize 7

Same name and namespace in other branches
  1. 1.1.x views_summarize.module \_views_summarize_get_prefix_suffix()

Gets the prefix and suffix for a summary's output, if they exist.

Parameters

type $options: The options element of the variables array that is passed into the summary theme function.

Return value

array The prefix and suffix in an associative array.

1 call to _views_summarize_get_prefix_suffix()
theme_views_summarize_type_currency in ./views_summarize.module
Theme: Total value for a currency amount

File

./views_summarize.module, line 461

Code

function _views_summarize_get_prefix_suffix($options) {
  $prefix_suffix = array(
    'prefix' => '',
    'suffix' => '',
  );
  if (!empty($options['views_field_settings']['prefix_suffix'])) {
    if (!empty($options['field_instance_settings']['prefix'])) {
      $prefix_suffix['prefix'] = $options['field_instance_settings']['prefix'];
    }
    if (!empty($options['field_instance_settings']['suffix'])) {
      $prefix_suffix['suffix'] = $options['field_instance_settings']['suffix'];
    }
  }
  return $prefix_suffix;
}