Hi all
I started to study Sylius, and I can't find answer for my question.
For example
I have two plugin. PluginOne, PluginTwo. Installing it into composer trought private repository (for example: saits)
I have one Doctrine Entity Sylius\Component\Product\Model\Product
Each on my plugin customize model Sylius\Component\Product\Model\Product.
For example
PluginOne - added field guid into entity
PluginTwo - added filed content_hash into entity
How can I do it?
I follow this docs
https://docs.sylius.com/en/1.2/customization/model.html
But can't find answer for my question.
There is no right answer sadly. One way is to create plugins that override core models with traits, so that if 2 plugins extends the same model, you just have to override it in AppBundle and use both plugins traits. If those plugins does not use traits, you'll manually have to copy methods and attributes into an override.
Most helpful comment
There is no right answer sadly. One way is to create plugins that override core models with traits, so that if 2 plugins extends the same model, you just have to override it in AppBundle and use both plugins traits. If those plugins does not use traits, you'll manually have to copy methods and attributes into an override.