Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / file / src / Plugin / Field / FieldFormatter / FileMediaFormatterInterface.php
diff --git a/web/core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterInterface.php b/web/core/modules/file/src/Plugin/Field/FieldFormatter/FileMediaFormatterInterface.php
new file mode 100644 (file)
index 0000000..98f1de1
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\file\Plugin\Field\FieldFormatter;
+
+/**
+ * Defines getter methods for FileMediaFormatterBase.
+ *
+ * This interface is used on the FileMediaFormatterBase class to ensure that
+ * each file media formatter will be based on a media type.
+ *
+ * Abstract classes are not able to implement abstract static methods,
+ * this interface will work around that.
+ *
+ * @see \Drupal\file\Plugin\Field\FieldFormatter\FileMediaFormatterBase
+ */
+interface FileMediaFormatterInterface {
+
+  /**
+   * Gets the applicable media type for a formatter.
+   *
+   * @return string
+   *   The media type of this formatter.
+   */
+  public static function getMediaType();
+
+}