Version 1
[yaffs-website] / web / modules / contrib / crop / src / Plugin / Crop / EntityProvider / File.php
diff --git a/web/modules/contrib/crop/src/Plugin/Crop/EntityProvider/File.php b/web/modules/contrib/crop/src/Plugin/Crop/EntityProvider/File.php
new file mode 100644 (file)
index 0000000..e8721d5
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+namespace Drupal\crop\Plugin\Crop\EntityProvider;
+
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\crop\EntityProviderBase;
+
+/**
+ * File crop integration.
+ *
+ * @CropEntityProvider(
+ *   entity_type = "file",
+ *   label = @Translation("File"),
+ *   description = @Translation("Provides crop integration for core files.")
+ * )
+ */
+class File extends EntityProviderBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function uri(EntityInterface $entity) {
+    /** @var \Drupal\file\FileInterface $entity */
+    return $entity->getFileUri();
+  }
+
+}