You are here

class DataDefinitionUndefinedNormalizer in JSON:API Schema 8

Data definition normalizer.

Hierarchy

Expanded class hierarchy of DataDefinitionUndefinedNormalizer

1 string reference to 'DataDefinitionUndefinedNormalizer'
jsonapi_schema.services.yml in ./jsonapi_schema.services.yml
jsonapi_schema.services.yml
1 service uses DataDefinitionUndefinedNormalizer
serializer.normalizer.data_definition.schema_json.undefined in ./jsonapi_schema.services.yml
Drupal\jsonapi_schema\Normalizer\DataDefinitionUndefinedNormalizer

File

src/Normalizer/DataDefinitionUndefinedNormalizer.php, line 10

Namespace

Drupal\jsonapi_schema\Normalizer
View source
class DataDefinitionUndefinedNormalizer extends DataDefinitionNormalizer {

  /**
   * {@inheritdoc}
   */
  protected $supportedDataTypes = [
    'undefined',
  ];

  /**
   * {@inheritdoc}
   */
  protected function extractPropertyData(DataDefinitionInterface $property, array $context = []) {
    return isset($context['name']) ? (object) [
      'title' => $context['name'],
    ] : (object) [];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY constant Name of key for bubbling cacheability metadata via serialization context.
DataDefinitionNormalizer::$format protected property The formats that the Normalizer can handle. Overrides NormalizerBase::$format
DataDefinitionNormalizer::$supportedInterfaceOrClass protected property The interface or class that this Normalizer supports. Overrides NormalizerBase::$supportedInterfaceOrClass 2
DataDefinitionNormalizer::denormalize public function
DataDefinitionNormalizer::JSON_TYPES constant
DataDefinitionNormalizer::normalize public function 2
DataDefinitionNormalizer::normalizeProperties protected function Normalize an array of data definitions.
DataDefinitionNormalizer::requiredProperty protected function Determine if the given property is a required element of the schema.
DataDefinitionNormalizer::supportsDenormalization public function Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization() Overrides NormalizerBase::supportsDenormalization
DataDefinitionNormalizer::supportsNormalization public function Checks whether the given class is supported for normalization by this normalizer. Overrides NormalizerBase::supportsNormalization 1
DataDefinitionUndefinedNormalizer::$supportedDataTypes protected property The supported data type. Overrides DataDefinitionNormalizer::$supportedDataTypes
DataDefinitionUndefinedNormalizer::extractPropertyData protected function Extracts property details from a data definition. Overrides DataDefinitionNormalizer::extractPropertyData
NormalizerBase::addCacheableDependency protected function Adds cacheability if applicable.
NormalizerBase::checkFormat protected function Checks if the provided format is supported by this normalizer. 2