3 namespace Drupal\Core\ImageToolkit\Annotation;
5 use Drupal\Component\Annotation\Plugin;
8 * Defines a Plugin annotation object for the image toolkit operation plugin.
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.
14 * Plugin namespace: Plugin\ImageToolkit\Operation
16 * For a working example, see
17 * \Drupal\system\Plugin\ImageToolkit\Operation\gd\Crop
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
28 class ImageToolkitOperation extends Plugin {
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.
38 * However, it is recommended that the following patterns be used:
39 * - '{toolkit}_{operation}' for the first implementation of an operation
41 * - '{module}_{toolkit}_{operation}' for overrides of existing
42 * implementations supplied by an alternative module, and for new
43 * module-supplied operations.
50 * The id of the image toolkit plugin for which the operation is implemented.
57 * The machine name of the image toolkit operation implemented (e.g. "crop").
64 * The human-readable name of the image toolkit operation.
66 * The string should be wrapped in a @Translation().
68 * @ingroup plugin_translatable
70 * @var \Drupal\Core\Annotation\Translation
75 * The description of the image toolkit operation.
77 * The string should be wrapped in a @Translation().
79 * @ingroup plugin_translatable
81 * @var \Drupal\Core\Annotation\Translation