EntityWrapperServiceInterface.php 461 Bytes
Newer Older
Mateu Aguiló Bosch's avatar
Mateu Aguiló Bosch committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

/**
 * @file
 * Contains \Drupal\typed_entity\Entity\EntityWrapperServiceInterface.
 */

namespace Drupal\typed_entity\Entity;

interface EntityWrapperServiceInterface {

  /**
   * Wraps an entity based on its type.
   *
   * @param string $entity_type
   *   The entity type.
   * @param mixed $entity
   *   The loaded entity or entity ID.
   *
   * @return \EntityDrupalWrapperInterface
   */
  public static function wrap($entity_type, $entity);

}