public function JsonldEntityWrapper::__construct

Constructor.

Parameters

string $entity: The Entity API entity

string $format.: The format.

\Symfony\Component\Serializer\Serializer $serializer: The serializer, provided by the SerializerAwareNormaizer.

File

drupal/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityWrapper.php, line 48
Definition of Drupal\jsonld\JsonldEntityWrapper.

Class

JsonldEntityWrapper
Provide an interface for JsonldNormalizer to get required properties.

Namespace

Drupal\jsonld

Code

public function __construct(Entity $entity, $format, $serializer) {
  $this->entity = $entity;
  $this->format = $format;
  $this->serializer = $serializer;
}