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

Breadcrumb

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

function DebugCommand::getAttributesData

Return value

array<string, array<string, mixed>>

1 call to DebugCommand::getAttributesData()
DebugCommand::dumpSerializerDataForClass in vendor/symfony/serializer/Command/DebugCommand.php

File

vendor/symfony/serializer/Command/DebugCommand.php, line 95

Class

DebugCommand
A console command to debug Serializer information.

Namespace

Symfony\Component\Serializer\Command

Code

private function getAttributesData(ClassMetadataInterface $classMetadata) : array {
    $data = [];
    foreach ($classMetadata->getAttributesMetadata() as $attributeMetadata) {
        $data[$attributeMetadata->getName()] = [
            'groups' => $attributeMetadata->getGroups(),
            'maxDepth' => $attributeMetadata->getMaxDepth(),
            'serializedName' => $attributeMetadata->getSerializedName(),
            'serializedPath' => $attributeMetadata->getSerializedPath() ? (string) $attributeMetadata->getSerializedPath() : null,
            'ignore' => $attributeMetadata->isIgnored(),
            'normalizationContexts' => $attributeMetadata->getNormalizationContexts(),
            'denormalizationContexts' => $attributeMetadata->getDenormalizationContexts(),
        ];
    }
    return $data;
}
RSS feed
Powered by Drupal