References FilterInterface
Reference
I
Interface

ApiPlatform\Metadata\FilterInterface

Filters applicable on a resource.

interface ApiPlatform\Metadata\FilterInterface
{
    public getDescription(string $resourceClass): array<string, array>
}

Methods

getDescription

Gets the description of this filter for the given resource.Returns an array with the filter parameter names as keys and array with the following data as values:

  • property: the property where the filter is applied
  • type: the type of the filter
  • required: if this filter is required
  • description : the description of the filter
  • strategy: the used strategy
  • is_collection: if this filter is for collection
  • swagger: additional parameters for the path operation, e.g. ‘swagger’ => [ ‘description’ => ‘My Description’, ’name’ => ‘My Name’, ’type’ => ‘integer’, ]
  • openapi: additional parameters for the path operation in the version 3 spec, e.g. ‘openapi’ => [ ‘description’ => ‘My Description’, ’name’ => ‘My Name’, ‘schema’ => [ ’type’ => ‘integer’, ] ]
  • schema: schema definition, e.g. ‘schema’ => [ ’type’ => ‘string’, ’enum’ => [‘value_1’, ‘value_2’], ] The description can contain additional data specific to a filter.
public getDescription(string $resourceClass): array<string, array>

Parameters

resourceClassstring

Returns

array<string, array>

See also

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