function Autowiring::__construct

Constructs an image toolkit operation plugin.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

array $plugin_definition: The plugin implementation definition.

\Psr\Log\LoggerInterface|\Drupal\Core\ImageToolkit\ImageToolkitInterface $toolkit: (deprecated) The image toolkit.

\Psr\Log\LoggerInterface|null $logger: A logger instance.

Overrides ImageToolkitOperationBase::__construct

File

core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/Operation/test/Autowiring.php, line 25

Class

Autowiring
Builds an image toolkit operation.

Namespace

Drupal\image_test\Plugin\ImageToolkit\Operation\test

Code

public function __construct(array $configuration, string $plugin_id, array $plugin_definition, #[Autowire(service: 'logger.channel.image')] LoggerInterface $logger, #[Autowire(service: 'messenger')] protected $messenger, private readonly StateInterface $state) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $logger);
}

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