You are here

public function CropEffect::__construct in Crop API 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/ImageEffect/CropEffect.php \Drupal\crop\Plugin\ImageEffect\CropEffect::__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 ImageEffectBase::__construct

File

src/Plugin/ImageEffect/CropEffect.php, line 59

Class

CropEffect
Crops an image resource.

Namespace

Drupal\crop\Plugin\ImageEffect

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerInterface $logger, CropStorageInterface $crop_storage, ConfigEntityStorageInterface $crop_type_storage, ImageFactory $image_factory) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $logger);
  $this->storage = $crop_storage;
  $this->typeStorage = $crop_type_storage;
  $this->imageFactory = $image_factory;
}