Constructor.
string $entity: The Entity API entity
string $format.: The format.
\Symfony\Component\Serializer\Serializer $serializer: The serializer, provided by the SerializerAwareNormaizer.
public function __construct(Entity $entity, $format, $serializer) {
$this->entity = $entity;
$this->format = $format;
$this->serializer = $serializer;
}