function datetimehideseconds_field_widget_settings_summary_alter in DateTime hide Seconds 8
Implements hook_field_widget_settings_summary_alter().
File
- ./
datetimehideseconds.module, line 67
Code
function datetimehideseconds_field_widget_settings_summary_alter(&$summary, $context) {
/** @var \Drupal\Core\Field\WidgetInterface $widget */
$widget = $context['widget'];
if ($widget instanceof DateTimeWidgetBase) {
if ($widget
->getThirdPartySetting('datetimehideseconds', 'hide')) {
$summary[] = t('Hide seconds.');
}
else {
$summary[] = t('Do not hide seconds.');
}
}
}