/**
  * @inheritdoc
  * @return FilterGroupConditionBuilder[]
  */
 public function build($conditions = null)
 {
     $groups = [];
     foreach ($conditions as $groupOperator => $filterData) {
         $group = StringUtils::toLower($groupOperator);
         if (!in_array($group, $this->getAvailableGroups())) {
             $group = FilterCondition::CONDITION_AND;
             $filterData = [$groupOperator => $filterData];
         }
         $conditionBuilder = new FilterGroupConditionBuilder();
         $conditionBuilder->setGroup($group);
         $conditionBuilder->setEventDispatcher($this->dispatcher);
         $conditionBuilder->setConditions($filterData);
         try {
             $groups[] = $conditionBuilder->build();
         } catch (InvalidConditionException $e) {
             continue;
         }
     }
     $this->groups = $groups;
     return $this->groups;
 }