$group =
$query->
orConditionGroup();
break;
} // Get all children of the group.
$members =
$condition_group->
members();
foreach ($members as $member) { // If the child is simply a condition, add it to the new group.
if ($member instanceof EntityCondition
) { if ($member->
operator() == 'IS NULL'
) { $group->
notExists($member->
field());
} elseif ($member->
operator() == 'IS NOT NULL'
) { $group->
exists($member->
field());
} else { $group->
condition($member->
field(),
$member->
value(),
$member->
operator());
} } // If the child is a group, then recursively construct a sub group.
elseif ($member instanceof EntityConditionGroup
) { // Add the subgroup to this new group.