private function recursion(array
$filters, EntityDefinition
$definition, string
$operator, bool
$negated): array
{ $mapped =
[];
// for each nesting level we need an own group to keep the mathematical logic
$prefix = Uuid::
randomHex();
foreach ($filters as $filter) { if ($filter instanceof MultiFilter
) { $nested =
$this->
recursion($filter->
getQueries(),
$definition,
$filter->
getOperator(),
$filter instanceof NotFilter ||
$negated);
$mapped =
array_merge_recursive($mapped,
$nested);
continue;
} if (!
$filter instanceof SingleFieldFilter
) { // this case should never happen, because all core filters are an instead of SingleFieldFilter or MultiFilter
$mapped[self::NOT_RELEVANT
][] =
$filter;
continue;
}