Skip to content

Add findBy to RouteRepository for Localization switcher #7874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Mar 31, 2025

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no yes
Fixed tickets fixes #
Related issues/PRs #7749
License MIT
Documentation PR sulu/sulu-docs#

What's in this PR?

Add findBy to RouteRepository for Localization switcher.

Why?

For the SettingsResolver in #7749 we need findBy method for receive all currently Routes for a specific resource by all published locales.

Typcial usage will be:

$this->routeRepository->findBy([
    'resourceKey' => 'example',
    'resourceId' => '1',
    'locales' => ['en', 'de', 'fr'],
])

To create a local switcher.

@Prokyonn FYI

@alexander-schranz alexander-schranz force-pushed the feature/add-find-by-route-repository branch from d1fcd6a to 4765ade Compare March 31, 2025 14:12
@alexander-schranz alexander-schranz added the Feature New functionality not yet included in Sulu label Mar 31, 2025
@wachterjohannes wachterjohannes merged commit bdfd845 into sulu:3.0 Apr 1, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality not yet included in Sulu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants