You are here

public static function BlazyAlter::fieldFormatterThirdPartySettingsForm in Blazy 8.2

Implements hook_field_formatter_third_party_settings_form().

1 call to BlazyAlter::fieldFormatterThirdPartySettingsForm()
blazy_field_formatter_third_party_settings_form in ./blazy.module
Implements hook_field_formatter_third_party_settings_form().

File

src/BlazyAlter.php, line 170

Class

BlazyAlter
Provides hook_alter() methods for Blazy.

Namespace

Drupal\blazy

Code

public static function fieldFormatterThirdPartySettingsForm(FormatterInterface $plugin) {
  if (in_array($plugin
    ->getPluginId(), self::thirdPartyFormatters())) {
    return [
      'blazy' => [
        '#type' => 'checkbox',
        '#title' => 'Blazy',
        '#default_value' => $plugin
          ->getThirdPartySetting('blazy', 'blazy', FALSE),
      ],
    ];
  }
  return [];
}