function addtocalendar_field_formatter_settings_summary_alter in Add To Calendar Button (AddEvent.com) 7
Same name and namespace in other branches
- 8 addtocalendar.module \addtocalendar_field_formatter_settings_summary_alter()
- 8.2 addtocalendar.module \addtocalendar_field_formatter_settings_summary_alter()
- 8.3 addtocalendar.module \addtocalendar_field_formatter_settings_summary_alter()
- 7.2 addtocalendar.module \addtocalendar_field_formatter_settings_summary_alter()
Implements hook_field_formatter_settings_summary_alter().
File
- ./
addtocalendar.module, line 150
Code
function addtocalendar_field_formatter_settings_summary_alter(&$summary, $context) {
// Append a message to the summary when foo_formatter has
// mymodule_extra_setting set to TRUE for the current view mode.
if ($context['instance']['display'][$context['view_mode']]['type'] == 'date_default') {
$display = $context['instance']['display'][$context['view_mode']];
$settings = $display['settings'];
if (!empty($summary)) {
$summary .= '';
}
if ($settings['addtocalendar_show']) {
$summary .= '</br>' . t('Add to calendar is enabled.');
}
else {
$summary .= '</br>' . t('Add to calendar is disabled.');
}
}
}