You are here

public function FocalPointManagerInterface::getCropEntity in Focal Point 8

Gets a crop entity for the given file.

If an existing crop entity is not found then a new one is created.

Parameters

\Drupal\file\FileInterface $file: File this focal point applies to.

string $crop_type: Crop type to be used.

Return value

\Drupal\crop\CropInterface Created crop entity.

1 method overrides FocalPointManagerInterface::getCropEntity()
FocalPointManager::getCropEntity in src/FocalPointManager.php
Gets a crop entity for the given file.

File

src/FocalPointManagerInterface.php, line 84

Class

FocalPointManagerInterface
Defines an interface for focal point manager.

Namespace

Drupal\focal_point

Code

public function getCropEntity(FileInterface $file, $crop_type);