code: protected function getAndOrFilter(IFilter $filter, $operation)
      {
          if (!$operation['children']) {
              return;
          }
  
          if ($operation['operation'] == 'AND') {
              $filterRule = new ConditionAnd();
          } else {
              $filterRule = new ConditionOr();
          }
          $filter->addFilterRule($filterRule);
  
          $children = $this->optimizedFilter($filterRule, $operation['children'], $operation['operation']);
  
          foreach ($children as $child) {
              $subFilter = $this->getMetaModel()->getEmptyFilter();
              $filterRule->addChild($subFilter);
              $this->calculateSubfilter($child, $subFilter);
          }
      }
docs: Build an AND or OR query.
  
  @param IFilter $filter    The filter to add the operations to.
  
  @param array   $operation The operation to convert.
  
  @return void