Guides
Tutorials
Doctrine MongoDB ODM filter interface.
Abstract class for easing the implementation of a filter.
class ApiPlatform\Doctrine\Odm\Filter\AbstractFilter implements `<a href="/docs/reference/Doctrine/Odm/Filter/FilterInterface">ApiPlatform\Doctrine\Odm\Filter\FilterInterface</a>`, `<a href="/docs/reference/Metadata/FilterInterface">ApiPlatform\Metadata\FilterInterface</a>`
{
public __construct(Doctrine\Persistence\ManagerRegistry $managerRegistry, null|Psr\Log\LoggerInterface $logger, null|array $properties, null|Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter)
public apply(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null
protected filterProperty(string $property, $value, Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null
protected getManagerRegistry(): Doctrine\Persistence\ManagerRegistry
protected getProperties(): array
protected getLogger(): Psr\Log\LoggerInterface
protected isPropertyEnabled(string $property, string $resourceClass): bool
protected denormalizePropertyName(string|int $property): string
protected normalizePropertyName(string $property): string
protected splitPropertyParts(string $property, string $resourceClass): array
protected getClassMetadata(string $resourceClass): Doctrine\Persistence\Mapping\ClassMetadata
protected addLookupsForNestedProperty(string $property, Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass): array
protected isPropertyMapped(string $property, string $resourceClass, bool $allowAssociation): bool
protected isPropertyNested(string $property, string $resourceClass): bool
protected isPropertyEmbedded(string $property, string $resourceClass): bool
protected getDoctrineFieldType(string $property, string $resourceClass): string
protected getNestedMetadata(string $resourceClass, array<int, string> $associations): Doctrine\Persistence\Mapping\ClassMetadata
public getDescription(string $resourceClass): array
}class ApiPlatform\Doctrine\Odm\Filter\AbstractFilter implements `<a href="/docs/reference/Doctrine/Odm/Filter/FilterInterface">ApiPlatform\Doctrine\Odm\Filter\FilterInterface</a>`, `<a href="/docs/reference/Metadata/FilterInterface">ApiPlatform\Metadata\FilterInterface</a>`
{
public __construct(Doctrine\Persistence\ManagerRegistry $managerRegistry, null|Psr\Log\LoggerInterface $logger, null|array $properties, null|Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter)
public apply(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null
protected filterProperty(string $property, $value, Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null
protected getManagerRegistry(): Doctrine\Persistence\ManagerRegistry
protected getProperties(): array
protected getLogger(): Psr\Log\LoggerInterface
protected isPropertyEnabled(string $property, string $resourceClass): bool
protected denormalizePropertyName(string|int $property): string
protected normalizePropertyName(string $property): string
protected splitPropertyParts(string $property, string $resourceClass): array
protected getClassMetadata(string $resourceClass): Doctrine\Persistence\Mapping\ClassMetadata
protected addLookupsForNestedProperty(string $property, Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass): array
protected isPropertyMapped(string $property, string $resourceClass, bool $allowAssociation): bool
protected isPropertyNested(string $property, string $resourceClass): bool
protected isPropertyEmbedded(string $property, string $resourceClass): bool
protected getDoctrineFieldType(string $property, string $resourceClass): string
protected getNestedMetadata(string $resourceClass, array<int, string> $associations): Doctrine\Persistence\Mapping\ClassMetadata
public getDescription(string $resourceClass): array
}Psr\Log\LoggerInterface $loggerPsr\Log\LoggerInterface $loggerDoctrine\Persistence\ManagerRegistry $managerRegistryDoctrine\Persistence\ManagerRegistry $managerRegistryarray $propertiesarray $propertiesSymfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverterSymfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverterpublic __construct(Doctrine\Persistence\ManagerRegistry $managerRegistry, null|Psr\Log\LoggerInterface $logger, null|array $properties, null|Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter)public __construct(Doctrine\Persistence\ManagerRegistry $managerRegistry, null|Psr\Log\LoggerInterface $logger, null|array $properties, null|Symfony\Component\Serializer\NameConverter\NameConverterInterface $nameConverter)| managerRegistry | Doctrine\Persistence\ManagerRegistry | |
| logger | Psr\Log\LoggerInterface | |
| properties | array | |
| nameConverter | Symfony\Component\Serializer\NameConverter\NameConverterInterface |
Applies the filter.
public apply(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): nullpublic apply(Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null| aggregationBuilder | Doctrine\ODM\MongoDB\Aggregation\Builder | |
| resourceClass | string | |
| operation | ApiPlatform\Metadata\Operation | |
| context | array |
null
Passes a property through the filter.
protected filterProperty(string $property, $value, Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): nullprotected filterProperty(string $property, $value, Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass, null|ApiPlatform\Metadata\Operation $operation, array $context): null| property | string | |
| value | ||
| aggregationBuilder | Doctrine\ODM\MongoDB\Aggregation\Builder | |
| resourceClass | string | |
| operation | ApiPlatform\Metadata\Operation | |
| context | array |
null
protected getManagerRegistry(): Doctrine\Persistence\ManagerRegistryprotected getManagerRegistry(): Doctrine\Persistence\ManagerRegistryDoctrine\Persistence\ManagerRegistry
protected getProperties(): arrayprotected getProperties(): arrayarray
protected getLogger(): Psr\Log\LoggerInterfaceprotected getLogger(): Psr\Log\LoggerInterfacePsr\Log\LoggerInterface
Determines whether the given property is enabled.
protected isPropertyEnabled(string $property, string $resourceClass): boolprotected isPropertyEnabled(string $property, string $resourceClass): bool| property | string | |
| resourceClass | string |
bool
protected denormalizePropertyName(string|int $property): stringprotected denormalizePropertyName(string|int $property): string| property | string int |
string
protected normalizePropertyName(string $property): stringprotected normalizePropertyName(string $property): string| property | string |
string
Splits the given property into parts.Returns an array with the following keys:
protected splitPropertyParts(string $property, string $resourceClass): arrayprotected splitPropertyParts(string $property, string $resourceClass): array| property | string | |
| resourceClass | string |
array
Gets class metadata for the given resource.
protected getClassMetadata(string $resourceClass): Doctrine\Persistence\Mapping\ClassMetadataprotected getClassMetadata(string $resourceClass): Doctrine\Persistence\Mapping\ClassMetadata| resourceClass | string |
Doctrine\Persistence\Mapping\ClassMetadata
Adds the necessary lookups for a nested property.
protected addLookupsForNestedProperty(string $property, Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass): arrayprotected addLookupsForNestedProperty(string $property, Doctrine\ODM\MongoDB\Aggregation\Builder $aggregationBuilder, string $resourceClass): array| property | string | |
| aggregationBuilder | Doctrine\ODM\MongoDB\Aggregation\Builder | |
| resourceClass | string |
array
Determines whether the given property is mapped.
protected isPropertyMapped(string $property, string $resourceClass, bool $allowAssociation): boolprotected isPropertyMapped(string $property, string $resourceClass, bool $allowAssociation): bool| property | string | |
| resourceClass | string | |
| allowAssociation | bool |
bool
Determines whether the given property is nested.
protected isPropertyNested(string $property, string $resourceClass): boolprotected isPropertyNested(string $property, string $resourceClass): bool| property | string | |
| resourceClass | string |
bool
Determines whether the given property is embedded.
protected isPropertyEmbedded(string $property, string $resourceClass): boolprotected isPropertyEmbedded(string $property, string $resourceClass): bool| property | string | |
| resourceClass | string |
bool
Gets the Doctrine Type of a given property/resourceClass.
protected getDoctrineFieldType(string $property, string $resourceClass): stringprotected getDoctrineFieldType(string $property, string $resourceClass): string| property | string | |
| resourceClass | string |
string
Gets nested class metadata for the given resource.
protected getNestedMetadata(string $resourceClass, array<int, string> $associations): Doctrine\Persistence\Mapping\ClassMetadataprotected getNestedMetadata(string $resourceClass, array<int, string> $associations): Doctrine\Persistence\Mapping\ClassMetadata| resourceClass | string | |
| associations | array<int, string> |
Doctrine\Persistence\Mapping\ClassMetadata