Skip to content
Snippets Groups Projects

Issue #3488241: Use attribute instead of annotation for image effect plugins

Merged znerol requested to merge issue/image_replace-3488241:3488241-use-attributes-for into 2.x
3 files
+ 25
22
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -4,6 +4,8 @@ namespace Drupal\image_replace\Plugin\ImageEffect;
use Drupal\Core\Image\ImageFactory;
use Drupal\Core\Image\ImageInterface;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\image\Attribute\ImageEffect;
use Drupal\image\ImageEffectBase;
use Drupal\image_replace\ImageReplaceStorageInterface;
use Psr\Log\LoggerInterface;
@@ -11,13 +13,12 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Rotates an image resource.
*
* @ImageEffect(
* id = "image_replace",
* label = @Translation("Replace image"),
* description = @Translation("Swap the original image if a replacement image was configured."),
* )
*/
#[ImageEffect(
id: "image_replace",
label: new TranslatableMarkup("Replace image"),
description: new TranslatableMarkup("Swap the original image if a replacement image was configured."),
)]
class ImageReplaceEffect extends ImageEffectBase {
/**
Loading