Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / crop / src / CropInterface.php
index 4c28b57f3e209b8fb4086c551cd31da7ee8af1cc..d8cb8ed721b07305d73254a6493df7ce91b07c4d 100644 (file)
@@ -3,6 +3,7 @@
 namespace Drupal\crop;
 
 use Drupal\Core\Entity\ContentEntityInterface;
+use Drupal\image\ImageStyleInterface;
 
 /**
  * Provides an interface defining the crop entity.
@@ -97,4 +98,17 @@ interface CropInterface extends ContentEntityInterface {
    */
   public static function findCrop($uri, $type);
 
+  /**
+   * Retrieve crop from given image style.
+   *
+   * @param string $uri
+   *   URI of the image.
+   * @param \Drupal\image\ImageStyleInterface $image_style
+   *   The image style.
+   *
+   * @return \Drupal\crop\CropInterface|null
+   *   Crop entity used by effect 'crop_crop' or NULL if crop doesn't exist.
+   */
+  public static function getCropFromImageStyle($uri, ImageStyleInterface $image_style);
+
 }