Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / field_widget_settings_summary_alter.twig
1 /**
2  * Implements hook_field_widget_settings_summary_alter().
3  */
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.');
10     }
11   }
12 }