You are here

function date_formatter_get_settings in Date 7

Same name and namespace in other branches
  1. 6.2 date/date.module \date_formatter_get_settings()

A copy of a D6 function we can use to retrive the formatter settings and return them as an option array.

File

./date.install, line 88
Installation code for CCK date module.

Code

function date_formatter_get_settings($field_name, $bundle, $context) {
  $options = array();
  $value = 'date:' . $bundle . ':' . $context . ':' . $field_name;
  $options['repeat']['show_repeat_rule'] = variable_get($value . '_show_repeat_rule', 'show');
  $options['multiple']['multiple_number'] = variable_get($value . '_multiple_number', '');
  $options['multiple']['multiple_from'] = variable_get($value . '_multiple_from', '');
  $options['multiple']['multiple_to'] = variable_get($value . '_multiple_to', '');
  $options['fromto']['fromto'] = variable_get($value . '_fromto', 'both');
  return $options;
}