trait BlazyDeprecatedTrait in Blazy 8.2
A Trait common for deprecated methods for easy removal and declutter.
@todo remove at blazy:8.x-2.1, or earlier.
Hierarchy
- trait \Drupal\blazy\BlazyDeprecatedTrait
See also
https://www.drupal.org/node/3103018
File
- src/
BlazyDeprecatedTrait.php, line 13
Namespace
Drupal\blazyView source
trait BlazyDeprecatedTrait {
/**
* Implements hook_field_formatter_info_alter().
*
* @todo remove from blazy:8.x-2.1 for
* \Drupal\blazy\Plugin\Field\FieldFormatter\BlazyMediaFormatter.
* @see https://www.drupal.org/node/3103018
*/
public static function fieldFormatterInfoAlter(array &$info) {
// Supports optional Media Entity via VEM/VEF if available.
$common = [
'description' => new TranslatableMarkup('Displays lazyloaded images, or iframes, for VEF/ ME.'),
'quickedit' => [
'editor' => 'disabled',
],
'provider' => 'blazy',
];
$info['blazy_file'] = $common + [
'id' => 'blazy_file',
'label' => new TranslatableMarkup('Blazy Image with VEF (deprecated)'),
'class' => 'Drupal\\blazy\\Plugin\\Field\\FieldFormatter\\BlazyFileFormatter',
'field_types' => [
'entity_reference',
'image',
],
];
$info['blazy_video'] = $common + [
'id' => 'blazy_video',
'label' => new TranslatableMarkup('Blazy Video (deprecated)'),
'class' => 'Drupal\\blazy\\Plugin\\Field\\FieldFormatter\\BlazyVideoFormatter',
'field_types' => [
'video_embed_field',
],
];
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BlazyDeprecatedTrait:: |
public static | function | Implements hook_field_formatter_info_alter(). |