function ImageToolkitOperation::__construct

Same name in other branches
  1. 11.x core/lib/Drupal/Core/ImageToolkit/Attribute/ImageToolkitOperation.php \Drupal\Core\ImageToolkit\Attribute\ImageToolkitOperation::__construct()

Constructs a new ImageToolkitOperation instance.

Parameters

string $id: The plugin ID. There are no strict requirements as to the string to be used to identify the plugin, since discovery of the appropriate operation plugin to be used to apply an operation is based on the values of the 'toolkit' and the 'operation' annotation values. However, it is recommended that the following patterns be used:

  • '{toolkit}_{operation}' for the first implementation of an operation by a toolkit.
  • '{module}_{toolkit}_{operation}' for overrides of existing implementations supplied by an alternative module, and for new module-supplied operations.

string $toolkit: The id of the image toolkit plugin for which the operation is implemented.

string $operation: The machine name of the image toolkit operation implemented (e.g. "crop").

\Drupal\Core\StringTranslation\TranslatableMarkup $label: The human-readable name of the image toolkit operation.

\Drupal\Core\StringTranslation\TranslatableMarkup|null $description: (optional) The description of the image toolkit operation.

class-string|null $deriver: (optional) The deriver class for the image toolkit operation.

Overrides Plugin::__construct

File

core/lib/Drupal/Core/ImageToolkit/Attribute/ImageToolkitOperation.php, line 62

Class

ImageToolkitOperation
Defines a Plugin attribute for the image toolkit plugin.

Namespace

Drupal\Core\ImageToolkit\Attribute

Code

public function __construct(string $id, string $toolkit, string $operation, TranslatableMarkup $label, ?TranslatableMarkup $description = NULL, ?string $deriver = NULL) {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.