function lazy_field_formatter_settings_summary_alter in Lazy-load 8
Same name and namespace in other branches
- 8.3 lazy.module \lazy_field_formatter_settings_summary_alter()
- 8.2 lazy.module \lazy_field_formatter_settings_summary_alter()
Implements hook_field_formatter_settings_summary_alter().
Parameters
$summary:
$context:
File
- ./
lazy.module, line 198 - Module file for Lazy-load.
Code
function lazy_field_formatter_settings_summary_alter(&$summary, $context) {
if ($context['formatter']
->getPluginId() === 'image') {
if ($context['formatter']
->getThirdPartySetting('lazy', 'lazy_image', FALSE)) {
$summary[] = t('Lazy-loading enabled');
}
}
}