2 * Implements hook_field_widget_settings_summary_alter().
4 function {{ machine_name }}_field_widget_settings_summary_alter(&$summary, $context) {
5 // Append a message to the summary when an instance of foo_widget has
6 // mysetting set to TRUE for the current view mode.
7 if ($context['widget']->getPluginId() == 'foo_widget') {
8 if ($context['widget']->getThirdPartySetting('my_module', 'my_setting')) {
9 $summary[] = t('My setting enabled.');