Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AbstractNormalizer.php

function AbstractNormalizer::getAttributeMetadata

@internal

2 calls to AbstractNormalizer::getAttributeMetadata()
AbstractNormalizer::getAttributeDenormalizationContext in vendor/symfony/serializer/Normalizer/AbstractNormalizer.php
Computes the denormalization context merged with current one. Metadata always wins over global context, as more specific.
AbstractNormalizer::getAttributeNormalizationContext in vendor/symfony/serializer/Normalizer/AbstractNormalizer.php
Computes the normalization context merged with current one. Metadata always wins over global context, as more specific.

File

vendor/symfony/serializer/Normalizer/AbstractNormalizer.php, line 583

Class

AbstractNormalizer
Normalizer implementation.

Namespace

Symfony\Component\Serializer\Normalizer

Code

protected function getAttributeMetadata(object|string $objectOrClass, string $attribute) : ?AttributeMetadataInterface {
    if (!$this->classMetadataFactory) {
        return null;
    }
    return $this->classMetadataFactory
        ->getMetadataFor($objectOrClass)
        ->getAttributesMetadata()[$attribute] ?? null;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal