public function ImagemagickToolkit::__construct in ImageMagick 8.2
Same name and namespace in other branches
- 8.3 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::__construct()
- 8 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::__construct()
Constructs an ImagemagickToolkit object.
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.
\Drupal\Core\ImageToolkit\ImageToolkitOperationManagerInterface $operation_manager: The toolkit operation manager.
\Psr\Log\LoggerInterface $logger: A logger instance.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.
\Drupal\imagemagick\ImagemagickFormatMapperInterface $format_mapper: The format mapper service.
\Drupal\file_mdm\FileMetadataManagerInterface $file_metadata_manager: The file metadata manager service.
\Drupal\imagemagick\ImagemagickExecManagerInterface $exec_manager: The ImageMagick execution manager service.
\Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher: The event dispatcher.
Overrides ImageToolkitBase::__construct
File
- src/
Plugin/ ImageToolkit/ ImagemagickToolkit.php, line 167
Class
- ImagemagickToolkit
- Provides ImageMagick integration toolkit for image manipulation.
Namespace
Drupal\imagemagick\Plugin\ImageToolkitCode
public function __construct(array $configuration, $plugin_id, array $plugin_definition, ImageToolkitOperationManagerInterface $operation_manager, LoggerInterface $logger, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, ImagemagickFormatMapperInterface $format_mapper, FileMetadataManagerInterface $file_metadata_manager, ImagemagickExecManagerInterface $exec_manager, EventDispatcherInterface $dispatcher = NULL) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $operation_manager, $logger, $config_factory);
$this->moduleHandler = $module_handler;
$this->formatMapper = $format_mapper;
$this->fileMetadataManager = $file_metadata_manager;
$this->execManager = $exec_manager;
$this->arguments = new ImagemagickExecArguments($this->execManager);
$this->eventDispatcher = $dispatcher ?: \Drupal::service('event_dispatcher');
}