function _smart_date_recur_label_freq_defaults in Smart Date 3.2.x
Same name and namespace in other branches
- 3.1.x modules/smart_date_recur/smart_date_recur.module \_smart_date_recur_label_freq_defaults()
- 3.3.x modules/smart_date_recur/smart_date_recur.module \_smart_date_recur_label_freq_defaults()
- 3.4.x modules/smart_date_recur/smart_date_recur.module \_smart_date_recur_label_freq_defaults()
Helper function to centralize default frequency values.
1 call to _smart_date_recur_label_freq_defaults()
- smart_date_recur_field_widget_settings_summary_alter in modules/
smart_date_recur/ smart_date_recur.module - Implements hook_field_formatter_settings_summary_alter().
File
- modules/
smart_date_recur/ smart_date_recur.module, line 829 - Field hooks for a field that stores a start and end date as timestamps.
Code
function _smart_date_recur_label_freq_defaults($freq_values) {
$labels = [];
$freq_labels = SmartDateRule::getFrequencyLabels();
foreach ($freq_values as $key => $value) {
if ($value && isset($freq_labels[$value])) {
$labels[$key] = $freq_labels[$value];
}
}
return $labels;
}