Interim commit.
[yaffs-website] / web / modules / contrib / entity_embed / src / EntityEmbedBuilderInterface.php
1 <?php
2
3 namespace Drupal\entity_embed;
4
5 use Drupal\Core\Entity\EntityInterface;
6
7 /**
8  * Defines services that are responsible for building of embedded entities.
9  *
10  * @internal
11  */
12 interface EntityEmbedBuilderInterface {
13
14   /**
15    * Builds the render array for an embedded entity.
16    *
17    * @param \Drupal\Core\Entity\EntityInterface $entity
18    *   The entity to be rendered.
19    * @param array $context
20    *   (optional) Array of context values, corresponding to the attributes on
21    *   the embed HTML tag.
22    *
23    * @return array
24    *   A render array.
25    *
26    * @todo improve documentation
27    */
28   public function buildEntityEmbed(EntityInterface $entity, array $context = []);
29
30 }