References PartialCollectionViewNormalizer
Reference
C
Class

ApiPlatform\Hydra\Serializer\PartialCollectionViewNormalizer

Adds a view key to the result of a paginated Hydra collection.

class ApiPlatform\Hydra\Serializer\PartialCollectionViewNormalizer implements Symfony\Component\Serializer\Normalizer\NormalizerInterface, Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface, ApiPlatform\Serializer\CacheableSupportsMethodInterface
{
    public __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $collectionNormalizer, string $pageParameterName, string $enabledParameterName, null|ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, null|Symfony\Component\PropertyAccess\PropertyAccessorInterface $propertyAccessor, int $urlGenerationStrategy)
    public normalize($object, null|string $format, array $context): ArrayObject|array|string|int|float|bool
    public supportsNormalization($data, null|string $format, array $context): bool
    public getSupportedTypes($format): array
    public hasCacheableSupportsMethod(): bool
    public setNormalizer(Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer): null
}

Methods

__construct

public __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $collectionNormalizer, string $pageParameterName, string $enabledParameterName, null|ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, null|Symfony\Component\PropertyAccess\PropertyAccessorInterface $propertyAccessor, int $urlGenerationStrategy)

Parameters

collectionNormalizerSymfony\Component\Serializer\Normalizer\NormalizerInterface
pageParameterNamestring
enabledParameterNamestring
resourceMetadataFactory`ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface`
propertyAccessorSymfony\Component\PropertyAccess\PropertyAccessorInterface
urlGenerationStrategyint

normalize

Normalizes an object into a set of arrays/scalars.

public normalize($object, null|string $format, array $context): ArrayObject|array|string|int|float|bool

Parameters

object
formatstring
contextarray

Returns

ArrayObject
array
string
int
float
bool

supportsNormalization

Checks whether the given class is supported for normalization by this normalizer.

public supportsNormalization($data, null|string $format, array $context): bool

Parameters

data
formatstring
contextarray

Returns

bool

getSupportedTypes

public getSupportedTypes($format): array

Parameters

format

Returns

array

hasCacheableSupportsMethod

public hasCacheableSupportsMethod(): bool

Returns

bool

setNormalizer

Sets the owning Normalizer object.

public setNormalizer(Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer): null

Parameters

normalizerSymfony\Component\Serializer\Normalizer\NormalizerInterface

Returns

null

Made with love by

Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.

Learn more

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop