function addtocalendar_field_formatter_settings_summary_alter in Add To Calendar Button (AddEvent.com) 8
Same name and namespace in other branches
- 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()
- 7 addtocalendar.module \addtocalendar_field_formatter_settings_summary_alter()
Implements hook_field_formatter_settings_summary_alter().
File
- ./
addtocalendar.module, line 39 - Contains module code.
Code
function addtocalendar_field_formatter_settings_summary_alter(&$summary, $context) {
if (count(array_intersect([
'datetime',
'daterange',
], $context['formatter']
->getPluginDefinition()['field_types']))) {
if ($context['formatter']
->getThirdPartySetting('addtocalendar', 'addtocalendar_show')) {
$summary[] = t('Add to calendar enabled');
}
}
}