public function SerializationTestNormalizer::supportsNormalization

Checks whether format is supported by this normalizer.

Parameters

mixed $data: Data to normalize.

string $format: Format the normalization result will be encoded as.

Return value

bool Returns TRUE if the normalizer can handle the request.

Overrides NormalizerInterface::supportsNormalization

File

drupal/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestNormalizer.php, line 52
Definition of Drupal\serialization_test\SerializationTestNormalizer.

Class

SerializationTestNormalizer

Namespace

Drupal\serialization_test

Code

public function supportsNormalization($data, $format = NULL) {
  return static::$format === $format;
}