Skip to content

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented Aug 18, 2025

No description provided.

core/filters.md Outdated
parameters: [
'dummy' => new QueryParameter(
provider: ReadLinkParameterProvider::class,
extraProperties: ['resource_class' => Dummy::class]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it also showcase the extra property uri_template?

core/filters.md Outdated
private ?int $id = null;
public function apply(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, ?Operation $operation = null, array $context = []): void
{
$value = $context['parameter']?->getValue();
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it advocate for $operation->getParameters()->get('myParameter')->getValue(); approach more than through the context?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really imo as the filter receives the parameter it is called on, in the other case you need to find the parameter though a filter may be used on many parameters.

@soyuka soyuka merged commit 399784d into api-platform:4.1 Aug 21, 2025
1 check passed
@soyuka soyuka deleted the parameters-doc branch August 21, 2025 09:24
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.

3 participants