Regarding passing $already_cloned array to EntityCloneEvent
I think it's possible without breaking any functionality.
See an example with an optional parameter.
EntityCloneEvent::__construct(...)
public function __construct(EntityInterface $entity, EntityInterface $cloned_entity, array $properties = [], array $already_cloned = []) {
Adding getter and setter methods would be great as well.
And you guys are breaking current implementation of users which already use existing implementation of event dispatching.
I think you have to implement another type of event if you really want to have it dispatched for references.
I think passing $already_cloned variable would be really useful for modifying.
What do you think?
At least for cases when some extra referenced entities might be cloned.
In the current implementation we aren't able to know if a referenced entity was already cloned or not.
rowen92 β created an issue.
Hello, a patch is added.
Great work guys, seems to be working well, any thoughts when it will be merged?
rowen92 β created an issue.
Hello, is that possible to have these changes in the dev version at least?
It would be great