function SerializationTestNormalizer::supportsNormalization

Same name in other branches
  1. 9 core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php \Drupal\serialization_test\SerializationTestNormalizer::supportsNormalization()
  2. 10 core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php \Drupal\serialization_test\SerializationTestNormalizer::supportsNormalization()
  3. 11.x core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php \Drupal\serialization_test\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.

File

core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php, line 47

Class

SerializationTestNormalizer

Namespace

Drupal\serialization_test

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.