subentity
247 sites
Security covered
This module supports subentity, a kind of entity which does not exist independently, it always attaches to a parent entity.
Similar to field_collection in Drupal 7 but for Drupal 8+. Similar to paragraphs but not another paragraph_type.
To begin with, use the Drush generator:
drush generate subentity
This will create a new subentity type, the same way as drush generate content-entity but the new entity type is a subentity (it always is attached to a parent entity, so no new module is created).
You will be able to reference your subentity to any parent entity through entity_reference field type.