DataDefinitionUndefinedNormalizer.php in JSON:API Schema 8
File
src/Normalizer/DataDefinitionUndefinedNormalizer.php
View source
<?php
namespace Drupal\jsonapi_schema\Normalizer;
use Drupal\Core\TypedData\DataDefinitionInterface;
class DataDefinitionUndefinedNormalizer extends DataDefinitionNormalizer {
protected $supportedDataTypes = [
'undefined',
];
protected function extractPropertyData(DataDefinitionInterface $property, array $context = []) {
return isset($context['name']) ? (object) [
'title' => $context['name'],
] : (object) [];
}
}