Skip to content

Added example in custom filter #1600

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

zzAIMoo
Copy link
Contributor

@zzAIMoo zzAIMoo commented Aug 30, 2022

Added an example in the Custom Filter section of the documentation to show how to use multiple properties in a custom filter

core/filters.md Outdated
These properties can then be accessed in the custom filter like this:
```php
//App/Filter/CustomAndFilter.php
protected function filterProperty(string $property, $value, QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$operationName doesn't exist anymore in main, does it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah didn't notice, changing it right now

Added an example in the Custom Filter section of the documentation to show how to use multiple properties in a custom filter
@zzAIMoo zzAIMoo force-pushed the zzAIMoo-docs/customfilter-multiple-properties-example branch from fe4fd99 to 3757b15 Compare August 30, 2022 13:31
@alanpoulain alanpoulain merged commit 5a2f9fc into api-platform:main Aug 30, 2022
@alanpoulain
Copy link
Member

Thanks!

@giovannialbero1992 giovannialbero1992 deleted the zzAIMoo-docs/customfilter-multiple-properties-example branch August 31, 2022 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants