public function JsonldEntityNormalizer::supportsNormalization

Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization()

Overrides JsonldNormalizerBase::supportsNormalization

File

drupal/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityNormalizer.php, line 33
Definition of Drupal\jsonld\JsonldEntityNormalizer.

Class

JsonldEntityNormalizer
Converts the Drupal entity object structure to JSON-LD array structure.

Namespace

Drupal\jsonld

Code

public function supportsNormalization($data, $format = NULL) {

  // @todo Switch to EntityInterface once all entity types are converted to
  // EntityNG.
  return parent::supportsNormalization($data, $format) && $data instanceof EntityNG;
}