You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fallback logic should get moved out of the trait into dedicated class(es) which could be easily replaced by custom user logic without adjusting the whole trait.
It should be possible to chain multiple strategies to handle the current state but in multiple classes.
A strategy instance should be created via DIC - this way an instance could also be bound, possible required injections will be done and custom arguments could be passed via an array like for LocaleStrategy.
The signature of called method should retrieve a lot of arguments to also handle model aware logic, attribute specific fallback and so on.
The method should return an instance of the translatable model orthrow an exception FallbackNotFound which contains all checked localesnull.
Every checked locale should be pushed to the collection. This way we can pass all already checked locales to the following strategies and prevent duplicated checks.
The text was updated successfully, but these errors were encountered:
@netdown I thought to use the posted configuration as default. This will represent the current state. The user can remove, replace or reorder them but by default we will keep the current state.
So it could be that we could also release it in a minor one instead of a new major.
The fallback logic should get moved out of the trait into dedicated class(es) which could be easily replaced by custom user logic without adjusting the whole trait.
It should be possible to chain multiple strategies to handle the current state but in multiple classes.
A strategy instance should be created via DIC - this way an instance could also be bound, possible required injections will be done and custom arguments could be passed via an array like for
LocaleStrategy
.The signature of called method should retrieve a lot of arguments to also handle model aware logic, attribute specific fallback and so on.
The method should return an instance of the translatable model or
throw an exceptionFallbackNotFound
which contains all checked localesnull
.Every checked locale should be pushed to the collection. This way we can pass all already checked locales to the following strategies and prevent duplicated checks.
The text was updated successfully, but these errors were encountered: