Skip to content
Snippets Groups Projects
Commit 5de6d25c authored by Florent Torregrosa's avatar Florent Torregrosa
Browse files

Issue #3456751 by Grimreaper: Convert plugin annotation into attribute

parent 4c634e59
No related branches found
No related tags found
1 merge request!16Issue #3456751 by Grimreaper: Convert plugin annotation into attribute
Pipeline #206915 passed
......@@ -5,22 +5,23 @@ declare(strict_types=1);
namespace Drupal\animated_gif\Plugin\Field\FieldFormatter;
use Drupal\animated_gif\AnimatedGifUtility;
use Drupal\Core\Field\Attribute\FieldFormatter;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\image\Plugin\Field\FieldFormatter\ImageUrlFormatter;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Plugin implementation of the 'image_url' formatter for animated_gif.
*
* @FieldFormatter(
* id = "animated_gif_image_url",
* label = @Translation("Animated GIF URL to image"),
* field_types = {
* "image"
* }
* )
*/
#[FieldFormatter(
id: 'animated_gif_image_url',
label: new TranslatableMarkup('Animated GIF URL to image'),
field_types: [
'image',
],
)]
class AnimatedGifImageUrlFormatter extends ImageUrlFormatter implements ContainerFactoryPluginInterface {
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment