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