Guides
Tutorials
Enhances the result of collection by adding the filters applied on collection.
class ApiPlatform\Hydra\Serializer\CollectionFiltersNormalizer implements Symfony\Component\Serializer\Normalizer\NormalizerInterface, Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface, Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface
{
public __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $collectionNormalizer, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, Psr\Container\ContainerInterface $filterLocator)
public supportsNormalization($data, null|string $format, array $context): bool
public hasCacheableSupportsMethod(): bool
public normalize($object, null|string $format, array $context): ArrayObject|array|string|int|float|bool
public setNormalizer(Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer): null
}
class ApiPlatform\Hydra\Serializer\CollectionFiltersNormalizer implements Symfony\Component\Serializer\Normalizer\NormalizerInterface, Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface, Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface
{
public __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $collectionNormalizer, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, Psr\Container\ContainerInterface $filterLocator)
public supportsNormalization($data, null|string $format, array $context): bool
public hasCacheableSupportsMethod(): bool
public normalize($object, null|string $format, array $context): ArrayObject|array|string|int|float|bool
public setNormalizer(Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer): null
}
public __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $collectionNormalizer, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, Psr\Container\ContainerInterface $filterLocator)
public __construct(Symfony\Component\Serializer\Normalizer\NormalizerInterface $collectionNormalizer, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, Psr\Container\ContainerInterface $filterLocator)
collectionNormalizer | Symfony\Component\Serializer\Normalizer\NormalizerInterface | |
resourceMetadataCollectionFactory | ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface | |
resourceClassResolver | ApiPlatform\Api\ResourceClassResolverInterface | |
filterLocator | Psr\Container\ContainerInterface | The new filter locator or the deprecated filter collection |
Checks whether the given class is supported for normalization by this normalizer.
public supportsNormalization($data, null|string $format, array $context): bool
public supportsNormalization($data, null|string $format, array $context): bool
data | ||
format | string | |
context | array |
bool
public hasCacheableSupportsMethod(): bool
public hasCacheableSupportsMethod(): bool
bool
Normalizes an object into a set of arrays/scalars.
public normalize($object, null|string $format, array $context): ArrayObject|array|string|int|float|bool
public normalize($object, null|string $format, array $context): ArrayObject|array|string|int|float|bool
object | ||
format | string | |
context | array |
ArrayObject
array
string
int
float
bool
Sets the owning Normalizer object.
public setNormalizer(Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer): null
public setNormalizer(Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer): null
normalizer | Symfony\Component\Serializer\Normalizer\NormalizerInterface |
null