Guides
Tutorials
This normalizer handles collections.
class ApiPlatform\Hydra\Serializer\CollectionNormalizer extends ApiPlatform\Serializer\AbstractCollectionNormalizer implements Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface, Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface, Symfony\Component\Serializer\Normalizer\NormalizerInterface
{
public __construct(ApiPlatform\JsonLd\ContextBuilderInterface $contextBuilder, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Api\IriConverterInterface $iriConverter, null|ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, array $defaultContext)
protected getPaginationData(iterable $object, array $context): array
protected getItemsData(iterable $object, null|string $format, array $context): array
protected initContext(string $resourceClass, array $context): array
public supportsNormalization($data, null|string $format, array $context): bool
public hasCacheableSupportsMethod(): bool
public normalize(null|iterable $object, null|string $format, array $context): ArrayObject|array|string|int|float|bool
protected normalizeRawCollection(iterable $object, null|string $format, array $context): ArrayObject|array
protected getPaginationConfig(iterable $object, array $context): array
protected getOperation(array $context): ApiPlatform\Metadata\Operation
public setNormalizer(Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer)
}class ApiPlatform\Hydra\Serializer\CollectionNormalizer extends ApiPlatform\Serializer\AbstractCollectionNormalizer implements Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface, Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface, Symfony\Component\Serializer\Normalizer\NormalizerInterface
{
public __construct(ApiPlatform\JsonLd\ContextBuilderInterface $contextBuilder, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Api\IriConverterInterface $iriConverter, null|ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, array $defaultContext)
protected getPaginationData(iterable $object, array $context): array
protected getItemsData(iterable $object, null|string $format, array $context): array
protected initContext(string $resourceClass, array $context): array
public supportsNormalization($data, null|string $format, array $context): bool
public hasCacheableSupportsMethod(): bool
public normalize(null|iterable $object, null|string $format, array $context): ArrayObject|array|string|int|float|bool
protected normalizeRawCollection(iterable $object, null|string $format, array $context): ArrayObject|array
protected getPaginationConfig(iterable $object, array $context): array
protected getOperation(array $context): ApiPlatform\Metadata\Operation
public setNormalizer(Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer)
}ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolverApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolverstring $pageParameterNamestring $pageParameterNameApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactoryApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactorySymfony\Component\Serializer\Normalizer\NormalizerInterface $normalizerSymfony\Component\Serializer\Normalizer\NormalizerInterface $normalizerpublic __construct(ApiPlatform\JsonLd\ContextBuilderInterface $contextBuilder, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Api\IriConverterInterface $iriConverter, null|ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, array $defaultContext)public __construct(ApiPlatform\JsonLd\ContextBuilderInterface $contextBuilder, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, ApiPlatform\Api\IriConverterInterface $iriConverter, null|ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, array $defaultContext)| contextBuilder | ApiPlatform\JsonLd\ContextBuilderInterface | |
| resourceClassResolver | ApiPlatform\Api\ResourceClassResolverInterface | |
| iriConverter | ApiPlatform\Api\IriConverterInterface | |
| resourceMetadataCollectionFactory | ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface | |
| defaultContext | array |
Gets the pagination data.
protected getPaginationData(iterable $object, array $context): arrayprotected getPaginationData(iterable $object, array $context): array| object | iterable | |
| context | array |
array
Gets items data.
protected getItemsData(iterable $object, null|string $format, array $context): arrayprotected getItemsData(iterable $object, null|string $format, array $context): array| object | iterable | |
| format | string | |
| context | array |
array
protected initContext(string $resourceClass, array $context): arrayprotected initContext(string $resourceClass, array $context): array| resourceClass | string | |
| context | array |
array