hook_field_formatter_settings_summary_alter(&$summary, $context)
Alters the field formatter settings summary.
array $summary: An array of summary messages.
$context: An associative array with the following elements:
\Drupal\field_ui\DisplayOverView
function hook_field_formatter_settings_summary_alter(&$summary, $context) { // Append a message to the summary when an instance of foo_formatter has // mysetting set to TRUE for the current view mode. if ($context['formatter']->getPluginId() == 'foo_formatter') { if ($context['formatter']->getThirdPartySetting('my_module', 'my_setting')) { $summary[] = t('My setting enabled.'); } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!field_ui!field_ui.api.php/function/hook_field_formatter_settings_summary_alter/8.1.x