You are here

public static function BlazyAlter::thirdPartyFormatters in Blazy 8.2

Provides the third party formatters where full blown Blazy is not worthy.

The module doesn't automatically convert the relevant theme to use Blazy, however two attributes are provided: `data-b-lazy` and `data-b-preview` which can be used to override a particular theme to use Blazy.

The `data-b-lazy`is a flag indicating Blazy is enabled. The `data-b-preview` is a flag indicating Blazy in CKEditor preview mode via Entity/Media Embed which normally means Blazy should be disabled due to CKEditor not supporting JS assets.

See also

\Drupal\blazy\Blazy::preprocessBlazy()

\Drupal\blazy\Blazy::preprocessField()

\Drupal\blazy\Blazy::preprocessFileVideo()

blazy_preprocess_file_video()

2 calls to BlazyAlter::thirdPartyFormatters()
BlazyAlter::fieldFormatterSettingsSummaryAlter in src/BlazyAlter.php
Implements hook_field_formatter_settings_summary_alter().
BlazyAlter::fieldFormatterThirdPartySettingsForm in src/BlazyAlter.php
Implements hook_field_formatter_third_party_settings_form().

File

src/BlazyAlter.php, line 135

Class

BlazyAlter
Provides hook_alter() methods for Blazy.

Namespace

Drupal\blazy

Code

public static function thirdPartyFormatters() {
  $formatters = [
    'file_video',
  ];
  blazy()
    ->getModuleHandler()
    ->alter('blazy_third_party_formatters', $formatters);
  return array_unique($formatters);
}