X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fcrop%2Fsrc%2FCropInterface.php;fp=web%2Fmodules%2Fcontrib%2Fcrop%2Fsrc%2FCropInterface.php;h=d8cb8ed721b07305d73254a6493df7ce91b07c4d;hp=4c28b57f3e209b8fb4086c551cd31da7ee8af1cc;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/modules/contrib/crop/src/CropInterface.php b/web/modules/contrib/crop/src/CropInterface.php index 4c28b57f3..d8cb8ed72 100644 --- a/web/modules/contrib/crop/src/CropInterface.php +++ b/web/modules/contrib/crop/src/CropInterface.php @@ -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); + }