Dynamic Fields on Entities #54608
Unanswered
rafaelmartinelli
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Are you familiar with the Entity–attribute–value model? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all,
This is a DB + Symfony + EasyAdminBundle question. I have an entity called
Event
. An event has some boring static fields likename
,url
,e-mail
, etc. Another entity, calledParticipant
, is part of an event, and also has some boring static fields, likename
,e-mail
, etc. Here is the catch, when creating an event, the user may say he wants some custom fields filled by each participant for his event, for example, telephone number, institution, etc. So, I was thinking how to code something flexible in this case. My current idea is to create two helper classesDynamicFieldTrait
andDynamicFieldValue
, like the following (assume everything is in the DB using Doctrine ORM):First question is, would it be the best design for what I want to achieve?
And then, I'm still thinking how to build a form for
Participant
, based on the fields described inEvent
, especially using EasyAdminBundle.Thank you!
Beta Was this translation helpful? Give feedback.
All reactions