Skip to content

Filter on current locale translations #57

@rsereir

Description

@rsereir

Hello !

I am trying to filter on current locale translations but i don't find any way to do that..

This is working for filter on all translations:
#[ApiFilter(SearchFilter::class, properties: ['translations.name'])]

I also want to order my list by current translation name:

'domains_list' => [ // @todo order
            'method' => 'GET',
            'path' => '/domains',
            'access_control' => 'is_granted(\''.Account::ROLE_USER.'\')',
            'normalization_context' => ['groups' => ['domains:list', 'domains:translations']],
            'order' => ['translations.name' => 'ASC'], // <- here i want to order on current locale
        ],

Someone have any idea to do that without rewriting all filter class ?

Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions