getChildren() is broken #17725
Replies: 2 comments 1 reply
-
I don't understand the second part your question so I can't really help there. But for the first part: Mentioned in the upgrade notes:
|
Beta Was this translation helpful? Give feedback.
-
There might be a misconception here: The And you don't have to specify the types twice, as they are effectively the same. The real place of them is foreach ($parentObject->getChildren([AbstractObject::OBJECT_TYPE_OBJECT, AbstractObject::OBJECT_TYPE_VARIANT]) as $childObject) {
// do something
} The class hierarchy internally is (usually) |
Beta Was this translation helpful? Give feedback.
-
When I call getChildren() to get all the child variants of a parent, it doesn't iterate over every child for some unknown reason.
To force iteration I have to do this every time I call getChildren()
This is getting kind of crazy.
Why are my objects different types of objects to begin with when I created them in the exact same way? Some are DataObjects, some are AbstractObjects, with absolutely no pattern to it. And either way, why doesn't getChildren just iterate over every data type by default?
Beta Was this translation helpful? Give feedback.
All reactions