1. 8.3.x core/lib/Drupal/Core/ImageToolkit/Annotation/ImageToolkitOperation.php
  2. 8.0.x core/lib/Drupal/Core/ImageToolkit/Annotation/ImageToolkitOperation.php
  3. 8.1.x core/lib/Drupal/Core/ImageToolkit/Annotation/ImageToolkitOperation.php
  4. 8.2.x core/lib/Drupal/Core/ImageToolkit/Annotation/ImageToolkitOperation.php
  5. 8.4.x core/lib/Drupal/Core/ImageToolkit/Annotation/ImageToolkitOperation.php

Namespace

Drupal\Core\ImageToolkit\Annotation

File

core/lib/Drupal/Core/ImageToolkit/Annotation/ImageToolkitOperation.php
View source
  1. <?php
  2. namespace Drupal\Core\ImageToolkit\Annotation;
  3. use Drupal\Component\Annotation\Plugin;
  4. /**
  5. * Defines a Plugin annotation object for the image toolkit operation plugin.
  6. *
  7. * An image toolkit operation plugin provides a self-contained image
  8. * manipulation routine, for a specific image toolkit. Examples of image
  9. * toolkit operations are scaling, cropping, rotating, etc.
  10. *
  11. * Plugin namespace: Plugin\ImageToolkit\Operation
  12. *
  13. * For a working example, see
  14. * \Drupal\system\Plugin\ImageToolkit\Operation\gd\Crop
  15. *
  16. * @see \Drupal\Core\ImageToolkit\Annotation\ImageToolkit
  17. * @see \Drupal\image\Annotation\ImageEffect
  18. * @see \Drupal\Core\ImageToolkit\ImageToolkitOperationInterface
  19. * @see \Drupal\Core\ImageToolkit\ImageToolkitOperationBase
  20. * @see \Drupal\Core\ImageToolkit\ImageToolkitOperationManager
  21. * @see plugin_api
  22. *
  23. * @Annotation
  24. */
  25. class ImageToolkitOperation extends Plugin {
  26. /**
  27. * The plugin ID.
  28. *
  29. * There are no strict requirements as to the string to be used to identify
  30. * the plugin, since discovery of the appropriate operation plugin to be
  31. * used to apply an operation is based on the values of the 'toolkit' and
  32. * the 'operation' annotation values.
  33. *
  34. * However, it is recommended that the following patterns be used:
  35. * - '{toolkit}_{operation}' for the first implementation of an operation
  36. * by a toolkit.
  37. * - '{module}_{toolkit}_{operation}' for overrides of existing
  38. * implementations supplied by an alternative module, and for new
  39. * module-supplied operations.
  40. *
  41. * @var string
  42. */
  43. public $id;
  44. /**
  45. * The id of the image toolkit plugin for which the operation is implemented.
  46. *
  47. * @var string
  48. */
  49. public $toolkit;
  50. /**
  51. * The machine name of the image toolkit operation implemented (e.g. "crop").
  52. *
  53. * @var string
  54. */
  55. public $operation;
  56. /**
  57. * The human-readable name of the image toolkit operation.
  58. *
  59. * The string should be wrapped in a @Translation().
  60. *
  61. * @ingroup plugin_translatable
  62. *
  63. * @var \Drupal\Core\Annotation\Translation
  64. */
  65. public $label;
  66. /**
  67. * The description of the image toolkit operation.
  68. *
  69. * The string should be wrapped in a @Translation().
  70. *
  71. * @ingroup plugin_translatable
  72. *
  73. * @var \Drupal\Core\Annotation\Translation
  74. */
  75. public $description;
  76. }

Classes

Namesort descending Description
ImageToolkitOperation Defines a Plugin annotation object for the image toolkit operation plugin.