- Issue created by @cnfl
- πΊπ¦Ukraine abramm Lutsk
Hi cnfl,
Plugin derivatives are not a single_content_sync specific feature; they are a Drupal way to use the same class for multiple plugins. You can learn more about derivatives in Drupal development docs. Due to this reason, it's not documented in the module.
We're using derivatives to use the same class for multiple field types plugins; e.g. it would be stupid to have separate classes, say, for string and number field types if their code would be 100% identical.
You don't necessarily need to use derivatives for your plugin; that depends on your the field type(s) you're working on. Is it a custom field type or something from Drupal.org ?
- π©πͺGermany cnfl
Hi abramm,
thanks for your quick answer and thanks for pointing me to derivatives. I guess it would be a solution to create a patch, cos in my case it would be just adding my field type to the already existing list in the SimpleFieldDeriver - like I saw in similar cases in this issue board. But a patch seems like an unstable solution to a permanent need, so I created a custom module with another plugin. So that works and again, thanks for pointing me to the right direction. I still think though that this could be made more clear in the documentation.
- πΊπ¦Ukraine abramm Lutsk
Well, if the field type comes from something that's published on Drupal.org and is maintained, we could easily merge in the patch. Everybody wins.