src/Hydra/Serializer/CollectionFiltersNormalizer.php
private function getSearch(string $resourceClass, array $parts, array $filters): array
    {
        $variables = [];
        $mapping = [];
        foreach ($filters as $filter) {
            foreach ($filter->getDescription($resourceClass) as $variable => $data) {
                $variables[] = $variable;
                $mapping[] = [
                    '@type' => 'IriTemplateMapping',
                    'variable' => $variable,
                    'property' => $data['property'],
                    'required' => $data['required'],
                ];
            }
        }

        return [
            '@type' => 'hydra:IriTemplate',
            'hydra:template' => sprintf('%s{?%s}', $parts['path'], implode(',', $variables)),
            'hydra:variableRepresentation' => 'BasicRepresentation',
            'hydra:mapping' => $mapping,
        ];
    }
private function getSearch(string $resourceClass, array $parts, array $filters): array
    {
        $variables = [];
        $mapping = [];
        foreach ($filters as $filter) {
            foreach ($filter->getDescription($resourceClass) as $variable => $data) {
                $variables[] = $variable;
                $mapping[] = [
                    '@type' => 'IriTemplateMapping',
                    'variable' => $variable,
                    'property' => $data['property'],
                    'required' => $data['required'],
                ];
            }
        }

        return [
            '@type' => 'hydra:IriTemplate',
            'hydra:template' => sprintf('%s{?%s}', $parts['path'], implode(',', $variables)),
            'hydra:variableRepresentation' => 'BasicRepresentation',
            'hydra:mapping' => $mapping,
        ];
    }
private function getSearch ( string $ resourceClass , array $ parts , array $ filters ) : array { $ variables = [ ] ; $ mapping = [ ] ; foreach ( $ filters as $ filter ) { foreach ( $ filter -> getDescription ( $ resourceClass ) as $ variable => $ data ) { $ variables [ ] = $ variable ; $ mapping [ ] = [ '@type' => 'IriTemplateMapping' , 'variable' => $ variable , 'property' => $ data [ 'property' ] , 'required' => $ data [ 'required' ] , ] ; } } return [ '@type' => 'hydra:IriTemplate' , 'hydra:template' => sprintf ( '%s{?%s}' , $ parts [ 'path' ] , implode ( ',' , $ variables ) ) , 'hydra:variableRepresentation' => 'BasicRepresentation' , 'hydra:mapping' => $ mapping , ] ; }
Returns the content of the Hydra search property.

@param FilterInterface[] $filters
Returns the content of the Hydra search property .