You are here

public function ReSmushit::__construct in Image Optimize reSmush.it 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/ImageAPIOptimizeProcessor/ReSmushit.php \Drupal\imageapi_optimize_resmushit\Plugin\ImageAPIOptimizeProcessor\ReSmushit::__construct()

Constructs a \Drupal\Component\Plugin\PluginBase object.

Parameters

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

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

Overrides ImageAPIOptimizeProcessorBase::__construct

File

src/Plugin/ImageAPIOptimizeProcessor/ReSmushit.php, line 35

Class

ReSmushit
Uses the resmush.it webservice to optimize an image.

Namespace

Drupal\imageapi_optimize_resmushit\Plugin\ImageAPIOptimizeProcessor

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerInterface $logger, ImageFactory $image_factory, ClientInterface $http_client) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $logger, $image_factory);
  $this->httpClient = $http_client;
}