You are here

function lazy_field_formatter_settings_summary_alter in Lazy-load 8

Same name and namespace in other branches
  1. 8.3 lazy.module \lazy_field_formatter_settings_summary_alter()
  2. 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');
    }
  }
}