You are here

public function ImagemagickToolkit::__construct in ImageMagick 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::__construct()
  2. 8.2 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.

string $app_root: The app root.

Overrides ImageToolkitBase::__construct

File

src/Plugin/ImageToolkit/ImagemagickToolkit.php, line 151

Class

ImagemagickToolkit
Provides ImageMagick integration toolkit for image manipulation.

Namespace

Drupal\imagemagick\Plugin\ImageToolkit

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, ImageToolkitOperationManagerInterface $operation_manager, LoggerInterface $logger, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, ImagemagickFormatMapperInterface $format_mapper, $app_root) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $operation_manager, $logger, $config_factory);
  $this->moduleHandler = $module_handler;
  $this->formatMapper = $format_mapper;
  $this->appRoot = $app_root;
  $this->isWindows = substr(PHP_OS, 0, 3) === 'WIN';
}