Hello, does somebody know if spryker supports any ...
# help
a
Hello, does somebody know if spryker supports any concept of “inheritance” regarding code buckets? There is this physical inheritance thing which will fallback to a default code bucket if not found any specific one … but would it be also possible to have something like: default->continent->region->country? So whenever a country specific code is not provided, the region bucket is the next “fallback” instead of default? I think there can be reached something like this using code inheritance, but this will also introduce a lot of boilerplate, especially when specific code buckets are becoming more Best regards
👀 1
w
No, there is no out of the box functionality to inherit one code bucket from another. But I'm pretty sure it's not that hard to implement by extending the
\Spryker\Shared\Kernel\ClassResolver\ClassNameCandidatesBuilder\ClassNameCandidatesBuilder::addProjectClassNames
a
I think this would be a beneficial thing to define your “own” order of how code is prioritized … i’ll have a look at it! thanks
I had a look and i don’t think it’s that trivial … along the code bucket itself there has to be some info about the order of the codebuckets, otherwise, spryker can’t decide to which code to fallback as next … also the “decision” about this is made in every single abstractclassresolver and has to be overridden …