You are here

public function ImageWidgetCropManager::__construct in Image Widget Crop 8

Same name and namespace in other branches
  1. 8.2 src/ImageWidgetCropManager.php \Drupal\image_widget_crop\ImageWidgetCropManager::__construct()

Constructs a ImageWidgetCropManager.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Entity type manager service.

File

src/ImageWidgetCropManager.php, line 61

Class

ImageWidgetCropManager
ImageWidgetCropManager calculation class.

Namespace

Drupal\image_widget_crop

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager) {
  $this->entityTypeManager = $entity_type_manager;
  $this->cropStorage = $this->entityTypeManager
    ->getStorage('crop');
  $this->cropTypeStorage = $this->entityTypeManager
    ->getStorage('crop_type');
  $this->imageStyleStorage = $this->entityTypeManager
    ->getStorage('image_style');
  $this->fileStorage = $this->entityTypeManager
    ->getStorage('file');
}