Version 1
[yaffs-website] / web / modules / contrib / entity_embed / src / EntityEmbedBuilderInterface.php
diff --git a/web/modules/contrib/entity_embed/src/EntityEmbedBuilderInterface.php b/web/modules/contrib/entity_embed/src/EntityEmbedBuilderInterface.php
new file mode 100644 (file)
index 0000000..e87c2c6
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+
+namespace Drupal\entity_embed;
+
+use Drupal\Core\Entity\EntityInterface;
+
+/**
+ * Defines services that are responsible for building of embedded entities.
+ *
+ * @internal
+ */
+interface EntityEmbedBuilderInterface {
+
+  /**
+   * Builds the render array for an embedded entity.
+   *
+   * @param \Drupal\Core\Entity\EntityInterface $entity
+   *   The entity to be rendered.
+   * @param array $context
+   *   (optional) Array of context values, corresponding to the attributes on
+   *   the embed HTML tag.
+   *
+   * @return array
+   *   A render array.
+   *
+   * @todo improve documentation
+   */
+  public function buildEntityEmbed(EntityInterface $entity, array $context = []);
+
+}