function _views_summarize_get_format_settings in Views Summarize 7
Gets the field's settings for formatting a number.
Parameters
type $options: The options element of the variables array that is passed into the summary theme function.
Return value
array The format settings in an associative array.
1 call to _views_summarize_get_format_settings()
- _views_summarize_get_formatted_summary in ./
views_summarize.module - Gets the summary's formatted result.
File
- ./
views_summarize.module, line 431
Code
function _views_summarize_get_format_settings($options) {
$format_settings = array(
'precision' => 0,
'decimal_separator' => NULL,
'thousand_separator' => NULL,
);
if (!empty($options['views_field_settings']['scale'])) {
$format_settings['precision'] = $options['views_field_settings']['scale'];
}
if (!empty($options['views_field_settings']['decimal_separator'])) {
$format_settings['decimal_separator'] = $options['views_field_settings']['decimal_separator'];
}
if (!empty($options['views_field_settings']['thousand_separator'])) {
$format_settings['thousand_separator'] = $options['views_field_settings']['thousand_separator'];
}
return $format_settings;
}