Reference
Filters applicable on a resource.
interface ApiPlatform\Metadata\FilterInterface
{
public getDescription(string $resourceClass): array
}
interface ApiPlatform\Metadata\FilterInterface
{
public getDescription(string $resourceClass): 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
- strategy (optional): the used strategy
- is_collection (optional): if this filter is for collection
- swagger (optional): additional parameters for the path operation,
e.g. 'swagger' => [
'description' => 'My Description',
'name' => 'My Name',
'type' => 'integer',
]
- openapi (optional): additional parameters for the path operation in the version 3 spec,
e.g. 'openapi' => [
'description' => 'My Description',
'name' => 'My Name',
'schema' => [
'type' => 'integer',
]
]
- schema (optional): 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
public getDescription(string $resourceClass): array
Parameters
Returns
array
See also