You are here

public static function EdgeEntityBase::createFrom in Apigee Edge 8

Creates a Drupal entity from an SDK Entity.

Parameters

\Apigee\Edge\Entity\EntityInterface $entity: An SDK entity.

Return value

\Drupal\apigee_edge\Entity\EdgeEntityInterface The Drupal entity that decorates the SDK entity.

Overrides EdgeEntityInterface::createFrom

File

src/Entity/EdgeEntityBase.php, line 129

Class

EdgeEntityBase
Base class for Apigee Edge entities in Drupal.

Namespace

Drupal\apigee_edge\Entity

Code

public static function createFrom(EntityInterface $entity) : EdgeEntityInterface {
  return new static([], NULL, $entity);
}