I have three entities:
class DataSet {
string $name;
Collection $points; // List<DataPoint>
Collection $groups; // List<DataGroup>
}
class DataGroup {
string $name;
Collection $assignedPoints; // List<DataGroupPoint>
}
class DataPoint {
string $name;
Collection $assignedGroups; // List<DataGroupPoint>
}
class DataGroupPoint {
DataGroup $group;
DataPoint $point;
int $data;
}
I extended the Admin UI to perform CRUD operations on the DataSet
entity, as per docs. By looking at the ContactBundle Javascript extension, I was able to add CRUD operations for DataPoint
entities within the DataSet
form by registering a CardCollection
- works fine.
Now, I want to perform CRUD operations on associated DataGroup
entities of the DataSet
as well - for that I want to put a MultiItemSelection
component into the DataGroup
overlay form in order to add, edit or remove DataGroupPoint
s.
For a DataGroupPoint
entity, both the DataGroup
and the DataPoint
are supposed to belong to the same DataSet
(which in turn is being edited in the overall form).
How can I provide all matching DataPoint
entities to the MultiItemSelection
?