BlazyDeprecatedTrait.php in Blazy 8.2
File
src/BlazyDeprecatedTrait.php
View source
<?php
namespace Drupal\blazy;
use Drupal\Core\StringTranslation\TranslatableMarkup;
trait BlazyDeprecatedTrait {
public static function fieldFormatterInfoAlter(array &$info) {
$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',
],
];
}
}