Version 1
[yaffs-website] / web / core / modules / serialization / src / EntityResolver / UuidReferenceInterface.php
diff --git a/web/core/modules/serialization/src/EntityResolver/UuidReferenceInterface.php b/web/core/modules/serialization/src/EntityResolver/UuidReferenceInterface.php
new file mode 100644 (file)
index 0000000..2d97648
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+namespace Drupal\serialization\EntityResolver;
+
+use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
+
+/**
+ * Interface for extracting UUID from entity reference data when denormalizing.
+ */
+interface UuidReferenceInterface extends NormalizerInterface {
+
+  /**
+   * Get the uuid from the data array.
+   *
+   * @param array $data
+   *   The data, as was passed into the Normalizer.
+   *
+   * @return string
+   *   A UUID.
+   */
+  public function getUuid($data);
+
+}